You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Mailjet::ApiError: error 400 while sending #<RestClient::Resource:0x00000101f373a0 @url="https://api.mailjet.com/v3/REST/contactdata", @block=nil, @options={:public_operations=>[:get, :put, :post, :delete], :read_only=>nil, :user=>"xxxxxx", :password=>"xxxxxxx"}> to https://api.mailjet.com/v3/REST/contactdata with {"ContactId"=>1, "Data"=>[{"Name"=>"language", "Value"=>"en"}]}
"{ \"ErrorInfo\" : \"\", \"ErrorMessage\" : \"Invalid json input: property \\\"Data[Name]\\\" not found at stream position 34\", \"StatusCode\" : 400 }"
Perhaps there is a problem with the way data are sent to the API : I have seen that the gem is sending using "application/x-www-form-urlencoded" content type, whereas in the mailjet api example they use json. Obvioulsy, when I tried with curl using the request made with the lib (url encoded), I got the same error, but if I tried with curl with json doing
The issue is fixed with the latest update to master branch. Seems the issue was what you were saying - not using JSON. Thank you for bringing this to our attention.
Hi,
I'am experiencing some trouble with the Contactdata.
Basically for a property 'language' with value 'en', I wrote :
but an error is raised:
Perhaps there is a problem with the way data are sent to the API : I have seen that the gem is sending using "application/x-www-form-urlencoded" content type, whereas in the mailjet api example they use json. Obvioulsy, when I tried with curl using the request made with the lib (url encoded), I got the same error, but if I tried with curl with json doing
and it worked perfectly, as well as if I directly use RestClient as below
Is there a known problem, and why the gem isn't using json?
Thanks
The text was updated successfully, but these errors were encountered: