banana-j / bananaj

Java API wrapper for MailChimp API 3.0
MIT License
38 stars 33 forks source link

Error adding Unicode content to a campaign #27

Closed gscriver closed 6 years ago

gscriver commented 6 years ago

MailChimp API returns error status 400 when content contains Unicode. URL: PUT https://us6.api.mailchimp.com/3.0/campaigns/[id]/content Reason: Bad Request - JSON Parse Error Details: We encountered an unspecified JSON parsing error.

gscriver commented 6 years ago

I have identified the cause to be improper UTF-8 encoding of the request body. This affects the PUT/POST/PATCH transport methods.

I am testing a fix for this issue and will create a pull request shortly.

alexanderwe commented 6 years ago

Ah alright 👍 , was also going to work on this right now. I will let you do the fix and will also take a look at it. I will then merge the fix into the develop branch since I changed some code in the Connection class, and did some minor changes to the code there.

In what exact call did this error appear ?

alexanderwe commented 6 years ago

Is resolved by merge #28 on develop. Thanks for your continuous work !