File tree Expand file tree Collapse file tree 5 files changed +19
-9
lines changed
CSharpHTTPClient/Properties Expand file tree Collapse file tree 5 files changed +19
-9
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file.
33
44This project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
55
6+ ## [ 2.0.5] - 2016-07-14
7+ ### Fixed
8+ - Solves [ issue #7 ] ( https://github.com/sendgrid/csharp-http-client/issues/7 )
9+ - Solves [ issue #256 ] ( https://github.com/sendgrid/sendgrid-csharp/issues/256 ) in the SendGrid C# Client
10+ - Do not try to encode the JSON request payload by replacing single quotes with double quotes
11+ - Updated examples and README to use JSON.NET to encode the payload
12+ - Thanks to [ Gunnar Liljas] ( https://github.com/gliljas ) for helping identify the issue!
13+
614## [ 2.0.2] - 2016-06-16
715### Added
816- Fix async, per https://github.com/sendgrid/sendgrid-csharp/issues/235
Original file line number Diff line number Diff line change 3131// You can specify all the values or you can default the Build and Revision Numbers
3232// by using the '*' as shown below:
3333// [assembly: AssemblyVersion("1.0.*")]
34- [ assembly: AssemblyVersion ( "2.0.4 " ) ]
35- [ assembly: AssemblyFileVersion ( "2.0.4 " ) ]
34+ [ assembly: AssemblyVersion ( "2.0.5 " ) ]
35+ [ assembly: AssemblyFileVersion ( "2.0.5 " ) ]
Original file line number Diff line number Diff line change 3232// You can specify all the values or you can default the Build and Revision Numbers
3333// by using the '*' as shown below:
3434// [assembly: AssemblyVersion("1.0.*")]
35- [ assembly: AssemblyVersion ( "2.0.4 " ) ]
36- [ assembly: AssemblyFileVersion ( "2.0.4 " ) ]
35+ [ assembly: AssemblyVersion ( "2.0.5 " ) ]
36+ [ assembly: AssemblyFileVersion ( "2.0.5 " ) ]
Original file line number Diff line number Diff line change @@ -44,12 +44,14 @@ Console.WriteLine(response.Headers.ToString());
4444
4545``` csharp
4646using SendGrid .CSharp .HTTP .Client ;
47+ using Newtonsoft .Json ;
4748globalRequestHeaders .Add (" Authorization" , " Bearer XXXXXXX" );
4849dynamic client = new Client (host : baseUrl , requestHeaders : globalRequestHeaders );
49- string queryParams = " {'Hello': 0, 'World': 1}" ;
50+ string queryParams = @ " {'Hello': 0, 'World': 1}" ;
5051requestHeaders .Add (" X-Test" , " test" );
51- string requestBody = " {'some': 1, 'awesome': 2, 'data': 3}" ;
52- var response = client .your .api ._ (param ).call .post (requestBody : requestBody ,
52+ string requestBody = @" {'some': 1, 'awesome': 2, 'data': 3}" ;
53+ Object json = JsonConvert .DeserializeObject <Object >(requestBody );
54+ var response = client .your .api ._ (param ).call .post (requestBody : json .ToString (),
5355 queryParams : queryParams ,
5456 requestHeaders : requestHeaders )
5557Console .WriteLine (response .StatusCode );
Original file line number Diff line number Diff line change 3232// You can specify all the values or you can default the Build and Revision Numbers
3333// by using the '*' as shown below:
3434// [assembly: AssemblyVersion("1.0.*")]
35- [ assembly: AssemblyVersion ( "2.0.4 " ) ]
36- [ assembly: AssemblyFileVersion ( "2.0.4 " ) ]
35+ [ assembly: AssemblyVersion ( "2.0.5 " ) ]
36+ [ assembly: AssemblyFileVersion ( "2.0.5 " ) ]
You can’t perform that action at this time.
0 commit comments