diff options
author | Elmer Thomas <elmer@thinkingserious.com> | 2016-07-18 14:11:23 -0700 |
---|---|---|
committer | Elmer Thomas <elmer@thinkingserious.com> | 2016-07-18 14:11:23 -0700 |
commit | 9d48986ef4662e9cd91235ef91fc097ca07e7a8d (patch) | |
tree | b51575c984fe94d7498e91b5d3ff05d46c6a9725 | |
parent | 37d469751aa68a9dde800a9ea90c1301ec02177e (diff) | |
download | sendgrid-csharp-origin/256-bad-json.zip sendgrid-csharp-origin/256-bad-json.tar.gz sendgrid-csharp-origin/256-bad-json.tar.bz2 |
Prepping for releaseorigin/256-bad-json
-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(); } |