diff --git a/.gitignore b/.gitignore index 725e07c..610a24a 100644 --- a/.gitignore +++ b/.gitignore @@ -12,5 +12,5 @@ CSharpHTTPClient/*/obj/ CSharpHTTPClient/CSharpHTTPClient.userprefs CSharpHTTPClient/packages/ CSharpHTTPClient/CSharpHTTPClient.sln.VisualState.xml -*.pfx -*.PublicKey \ No newline at end of file +*.PublicKey +*.pfx \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index b01b040..621ac41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## [2.0.2] - 2016-06-16 +### Added +- Fix async, per https://github.com/sendgrid/sendgrid-csharp/issues/235 + ## [2.0.1] - 2016-06-03 ### Added - Sign assembly with a strong name diff --git a/CSharpHTTPClient/Client.cs b/CSharpHTTPClient/Client.cs index 0e5ed20..84a3f46 100644 --- a/CSharpHTTPClient/Client.cs +++ b/CSharpHTTPClient/Client.cs @@ -162,7 +162,7 @@ private Client BuildClient(string name = null) /// /// Add the authorization header, override to customize /// - /// Authoriztion header + /// Authorization header /// Authorization value to add to the header public virtual AuthenticationHeaderValue AddAuthorization(KeyValuePair header) { @@ -261,7 +261,7 @@ public override bool TryInvokeMember(InvokeMemberBinder binder, object[] args, o /// Response object public async virtual Task MakeRequest(HttpClient client, HttpRequestMessage request) { - HttpResponseMessage response = await client.SendAsync(request); + HttpResponseMessage response = await client.SendAsync(request).ConfigureAwait(false); return new Response(response.StatusCode, response.Content, response.Headers); } @@ -318,7 +318,7 @@ private async Task RequestAsync(string method, String requestBody = nu RequestUri = new Uri(endpoint), Content = content }; - return await MakeRequest(client, request); + return await MakeRequest(client, request).ConfigureAwait(false); } catch (Exception ex) diff --git a/CSharpHTTPClient/Properties/AssemblyInfo.cs b/CSharpHTTPClient/Properties/AssemblyInfo.cs index b169962..d8352c1 100644 --- a/CSharpHTTPClient/Properties/AssemblyInfo.cs +++ b/CSharpHTTPClient/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.1")] -[assembly: AssemblyFileVersion("2.0.1")] +[assembly: AssemblyVersion("2.0.2")] +[assembly: AssemblyFileVersion("2.0.2")] diff --git a/Example/Example.cs b/Example/Example.cs index 2184655..e59e540 100644 --- a/Example/Example.cs +++ b/Example/Example.cs @@ -27,7 +27,7 @@ static void Main(string[] args) }"; Dictionary requestHeaders = new Dictionary(); requestHeaders.Add("X-Test", "test"); - dynamic response = client.version("v3").api_keys.get(queryParams: queryParams, requestHeaders: requestHeaders); + dynamic response = client.api_keys.get(queryParams: queryParams, requestHeaders: requestHeaders); // Console.WriteLine(response.StatusCode); // Console.WriteLine(response.Body.ReadAsStringAsync().Result); // Console.WriteLine(response.Headers.ToString()); diff --git a/Example/Properties/AssemblyInfo.cs b/Example/Properties/AssemblyInfo.cs index de57815..869c6a7 100644 --- a/Example/Properties/AssemblyInfo.cs +++ b/Example/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.1.0")] -[assembly: AssemblyFileVersion("2.0.1.0")] +[assembly: AssemblyVersion("2.0.2")] +[assembly: AssemblyFileVersion("2.0.2")] diff --git a/UnitTest/Properties/AssemblyInfo.cs b/UnitTest/Properties/AssemblyInfo.cs index 55d415c..38fc616 100644 --- a/UnitTest/Properties/AssemblyInfo.cs +++ b/UnitTest/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.0.1.0")] -[assembly: AssemblyFileVersion("2.0.1.0")] +[assembly: AssemblyVersion("2.0.2")] +[assembly: AssemblyFileVersion("2.0.2")]