On Wednesday, 4 December 2013 21:20:36 UTC-5, [email protected]
wrote:
{:key => “XXXXXXXXXXXXXXXXX”,
the error:
{“status”:“error”,“code”:-2,“name”:“ValidationError”,“message”:“Validation
error: {“message”:{“to”:[“Please enter an array”]}}”}
I’m using the Mandrill API.
RestClient sends requests as application/x-www-form-urlencoded by
default,
so your data is getting flattened out. Try adding { :content_type =>
:json
} as the last argument to your call.
You may also want to evaluate what you need to do that isn’t already
covered by the vendor-supported Mandrill API gem:
{“status”:“error”,“code”:-2,“name”:“ValidationError”,“message”:“Validation
error: {“message”:{“to”:[“Please enter an array”]}}”}
I’m using the Mandrill API.
Thank’s!!!
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.