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
The web service to add multiple recipients is returning invalid request body when I include a custom field with an apostrophe in the value. According to JSONLint the JSON is valid.
I have tried encoding in various ways such as URL, JavaScript, HTML. This results in the request being accepted but the string doesn't get decoded when it's displayed on the SendGrid website.
Steps to Reproduce
I am using Newtonsoft to serialize my list of objects into JSON and get this -
Issue Summary
The web service to add multiple recipients is returning invalid request body when I include a custom field with an apostrophe in the value. According to JSONLint the JSON is valid.
I have tried encoding in various ways such as URL, JavaScript, HTML. This results in the request being accepted but the string doesn't get decoded when it's displayed on the SendGrid website.
Steps to Reproduce
I am using Newtonsoft to serialize my list of objects into JSON and get this -
[{
"email": "[email protected]",
"first_name": "Graham",
"last_name": "Ha",
"interests": "Don't know"
}]
I then use pass the json string to this method -
sg.client.contactdb.recipients.post(requestBody: json);
The response is BadRequest - invalid request body.
If I pass the same JSON without the apostrophe on Don't know then it accepts it.
Technical details:
The text was updated successfully, but these errors were encountered: