File tree 5 files changed +19
-9
lines changed
CSharpHTTPClient/Properties
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.
3
3
4
4
This project adheres to [ Semantic Versioning] ( http://semver.org/ ) .
5
5
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
+
6
14
## [ 2.0.2] - 2016-06-16
7
15
### Added
8
16
- Fix async, per https://github.com/sendgrid/sendgrid-csharp/issues/235
Original file line number Diff line number Diff line change 31
31
// You can specify all the values or you can default the Build and Revision Numbers
32
32
// by using the '*' as shown below:
33
33
// [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 32
32
// You can specify all the values or you can default the Build and Revision Numbers
33
33
// by using the '*' as shown below:
34
34
// [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());
44
44
45
45
``` csharp
46
46
using SendGrid .CSharp .HTTP .Client ;
47
+ using Newtonsoft .Json ;
47
48
globalRequestHeaders .Add (" Authorization" , " Bearer XXXXXXX" );
48
49
dynamic client = new Client (host : baseUrl , requestHeaders : globalRequestHeaders );
49
- string queryParams = " {'Hello': 0, 'World': 1}" ;
50
+ string queryParams = @ " {'Hello': 0, 'World': 1}" ;
50
51
requestHeaders .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 (),
53
55
queryParams : queryParams ,
54
56
requestHeaders : requestHeaders )
55
57
Console .WriteLine (response .StatusCode );
Original file line number Diff line number Diff line change 32
32
// You can specify all the values or you can default the Build and Revision Numbers
33
33
// by using the '*' as shown below:
34
34
// [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