diff options
-rw-r--r-- | CHANGELOG.md | 8 | ||||
-rw-r--r-- | SendGrid/Example/Example.cs | 12 |
2 files changed, 12 insertions, 8 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f31ea8..a0cd091 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ # Change Log All notable changes to this project will be documented in this file. +## [7.0.7] - 2016-07-18 +- Fix for [issue #256](https://github.com/sendgrid/sendgrid-csharp/issues/256): SendGrid v3 and HTML emails - Creates bad Json +- Updated dependency to SendGrid.Csharp.HTTP.Client to 2.0.6 +- Updated dependency to JSON.NET to 9.0.1 in the Example and SendGrid projects +- Removed dependencies to SendGrid.CSharp.HTTP.Client and SendGrid.SmtpApi from the Example and UnitTests projects as they are not needed +- Update examples, unit tests and USAGE.md to pass in valid JSON +- Thanks to [Gunnar Liljas](https://github.com/gliljas) for helping find the root cause quickly! + ## [7.0.6] - 2016-07-12 ### Added - Update docs, unit tests and examples to include Sender ID diff --git a/SendGrid/Example/Example.cs b/SendGrid/Example/Example.cs index b3ec35c..133160f 100644 --- a/SendGrid/Example/Example.cs +++ b/SendGrid/Example/Example.cs @@ -32,14 +32,12 @@ namespace Example Email email = new Email("test2@example.com"); mail.Personalization[0].AddTo(email); - String ret = mail.Get(); - Object requestBody = JsonConvert.DeserializeObject<Object>(ret); - dynamic response = sg.client.mail.send.post(requestBody: requestBody.ToString()); + dynamic response = sg.client.mail.send.post(requestBody: mail.Get()); Console.WriteLine(response.StatusCode); Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); - Console.WriteLine(ret); + Console.WriteLine(mail.Get()); Console.ReadLine(); } @@ -231,14 +229,12 @@ namespace Example email.Address = "test@example.com"; mail.ReplyTo = email; - String ret = mail.Get(); - Object requestBody = JsonConvert.DeserializeObject<Object>(ret); - dynamic response = sg.client.mail.send.post(requestBody: requestBody.ToString()); + dynamic response = sg.client.mail.send.post(requestBody: mail.Get()); Console.WriteLine(response.StatusCode); Console.WriteLine(response.Body.ReadAsStringAsync().Result); Console.WriteLine(response.Headers.ToString()); - Console.WriteLine(ret); + Console.WriteLine(mail.Get()); Console.ReadLine(); } |