Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't add recipient with custom field with an apostrophe in value #279

Closed
grahamha opened this issue Jul 15, 2016 · 1 comment
Closed

Can't add recipient with custom field with an apostrophe in value #279

grahamha opened this issue Jul 15, 2016 · 1 comment
Labels
status: duplicate duplicate issue

Comments

@grahamha
Copy link

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:

  • sendgrid-csharp Version: 7.0.4
  • .NET Version: 4.5
@thinkingserious thinkingserious added the status: duplicate duplicate issue label Jul 18, 2016
@thinkingserious
Copy link
Contributor

Hello @grahamha,

This issue is just about fixed, please follow this issue for updates: #256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: duplicate duplicate issue
Projects
None yet
Development

No branches or pull requests

2 participants