diff options
author | Elmer Thomas <elmer@thinkingserious.com> | 2016-06-03 19:11:22 -0700 |
---|---|---|
committer | Elmer Thomas <elmer@thinkingserious.com> | 2016-06-03 19:11:22 -0700 |
commit | a01e8abd40694c9b49f5f2818f66d879660eab8f (patch) | |
tree | 59bb89cafe8fcd87796a64c13ae8fa6634825fd3 /SendGrid/Example | |
parent | cc9e4e317d998a703f8d25e27f57c37be2132b33 (diff) | |
download | sendgrid-csharp-a01e8abd40694c9b49f5f2818f66d879660eab8f.zip sendgrid-csharp-a01e8abd40694c9b49f5f2818f66d879660eab8f.tar.gz sendgrid-csharp-a01e8abd40694c9b49f5f2818f66d879660eab8f.tar.bz2 |
Updating csharp-http-client dependency
Diffstat (limited to 'SendGrid/Example')
-rw-r--r-- | SendGrid/Example/Example.cs | 32 | ||||
-rw-r--r-- | SendGrid/Example/Example.csproj | 4 | ||||
-rw-r--r-- | SendGrid/Example/Properties/AssemblyInfo.cs | 14 | ||||
-rw-r--r-- | SendGrid/Example/packages.config | 2 |
4 files changed, 26 insertions, 26 deletions
diff --git a/SendGrid/Example/Example.cs b/SendGrid/Example/Example.cs index 763c6d8..5155e9d 100644 --- a/SendGrid/Example/Example.cs +++ b/SendGrid/Example/Example.cs @@ -36,8 +36,8 @@ namespace Example string requestBody = ret; dynamic response = sg.client.mail.send.beta.post(requestBody: requestBody); Console.WriteLine(response.StatusCode); - Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result); - Console.WriteLine(response.ResponseHeaders.ToString()); + Console.WriteLine(response.Body.ReadAsStringAsync().Result); + Console.WriteLine(response.Headers.ToString()); Console.WriteLine(ret); Console.ReadLine(); @@ -236,8 +236,8 @@ namespace Example string requestBody = ret; dynamic response = sg.client.mail.send.beta.post(requestBody: requestBody); Console.WriteLine(response.StatusCode); - Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result); - Console.WriteLine(response.ResponseHeaders.ToString()); + Console.WriteLine(response.Body.ReadAsStringAsync().Result); + Console.WriteLine(response.Headers.ToString()); Console.WriteLine(ret); Console.ReadLine(); @@ -253,8 +253,8 @@ namespace Example }"; dynamic response = sg.client.api_keys.get(queryParams: queryParams); Console.WriteLine(response.StatusCode); - Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result); - Console.WriteLine(response.ResponseHeaders.ToString()); + Console.WriteLine(response.Body.ReadAsStringAsync().Result); + Console.WriteLine(response.Headers.ToString()); Console.WriteLine("\n\nPress any key to continue to POST."); Console.ReadLine(); @@ -270,10 +270,10 @@ namespace Example }"; response = sg.client.api_keys.post(requestBody: requestBody); Console.WriteLine(response.StatusCode); - Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result); - Console.WriteLine(response.ResponseHeaders.ToString()); + Console.WriteLine(response.Body.ReadAsStringAsync().Result); + Console.WriteLine(response.Headers.ToString()); JavaScriptSerializer jss = new JavaScriptSerializer(); - var ds_response = jss.Deserialize<Dictionary<string, dynamic>>(response.ResponseBody.ReadAsStringAsync().Result); + var ds_response = jss.Deserialize<Dictionary<string, dynamic>>(response.Body.ReadAsStringAsync().Result); string api_key_id = ds_response["api_key_id"]; Console.WriteLine("\n\nPress any key to continue to GET single."); @@ -282,8 +282,8 @@ namespace Example // GET Single response = sg.client.api_keys._(api_key_id).get(); Console.WriteLine(response.StatusCode); - Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result); - Console.WriteLine(response.ResponseHeaders.ToString()); + Console.WriteLine(response.Body.ReadAsStringAsync().Result); + Console.WriteLine(response.Headers.ToString()); Console.WriteLine("\n\nPress any key to continue to PATCH."); Console.ReadLine(); @@ -294,8 +294,8 @@ namespace Example }"; response = sg.client.api_keys._(api_key_id).patch(requestBody: requestBody); Console.WriteLine(response.StatusCode); - Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result); - Console.WriteLine(response.ResponseHeaders.ToString()); + Console.WriteLine(response.Body.ReadAsStringAsync().Result); + Console.WriteLine(response.Headers.ToString()); Console.WriteLine("\n\nPress any key to continue to PUT."); Console.ReadLine(); @@ -310,8 +310,8 @@ namespace Example }"; response = sg.client.api_keys._(api_key_id).put(requestBody: requestBody); Console.WriteLine(response.StatusCode); - Console.WriteLine(response.ResponseBody.ReadAsStringAsync().Result); - Console.WriteLine(response.ResponseHeaders.ToString()); + Console.WriteLine(response.Body.ReadAsStringAsync().Result); + Console.WriteLine(response.Headers.ToString()); Console.WriteLine("\n\nPress any key to continue to DELETE."); Console.ReadLine(); @@ -319,7 +319,7 @@ namespace Example // DELETE response = sg.client.api_keys._(api_key_id).delete(); Console.WriteLine(response.StatusCode); - Console.WriteLine(response.ResponseHeaders.ToString()); + Console.WriteLine(response.Headers.ToString()); Console.WriteLine("\n\nPress any key to exit."); Console.ReadLine(); diff --git a/SendGrid/Example/Example.csproj b/SendGrid/Example/Example.csproj index 038265c..4376fd7 100644 --- a/SendGrid/Example/Example.csproj +++ b/SendGrid/Example/Example.csproj @@ -45,7 +45,7 @@ </DefineConstants>
</PropertyGroup>
<ItemGroup>
- <Reference Include="CSharpHTTPClient, Version=1.0.2.0, Culture=neutral, PublicKeyToken=79219bf4e5ecaaca, processorArchitecture=MSIL">
+ <Reference Include="CSharpHTTPClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=79219bf4e5ecaaca, processorArchitecture=MSIL">
<HintPath>..\packages\SendGrid.CSharp.HTTP.Client.1.0.2\lib\CSharpHTTPClient.dll</HintPath>
<Private>True</Private>
</Reference>
@@ -86,7 +86,7 @@ </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
diff --git a/SendGrid/Example/Properties/AssemblyInfo.cs b/SendGrid/Example/Properties/AssemblyInfo.cs index 87d5e71..8c0cc2a 100644 --- a/SendGrid/Example/Properties/AssemblyInfo.cs +++ b/SendGrid/Example/Properties/AssemblyInfo.cs @@ -1,7 +1,7 @@ using System.Reflection;
using System.Runtime.InteropServices;
-// General Information about an assembly is controlled through the following
+// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
@@ -14,8 +14,8 @@ using System.Runtime.InteropServices; [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
@@ -27,13 +27,13 @@ using System.Runtime.InteropServices; // Version information for an assembly consists of the following four values:
//
// Major Version
-// Minor Version
+// Minor Version
// Build Number
// Revision
//
-// You can specify all the values or you can default the Build and Revision Numbers
+// 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("1.2.0")]
-[assembly: AssemblyFileVersion("1.2.0")]
\ No newline at end of file +[assembly: AssemblyVersion("7.0.0")]
+[assembly: AssemblyFileVersion("7.0.0")]
\ No newline at end of file diff --git a/SendGrid/Example/packages.config b/SendGrid/Example/packages.config index a5881ad..8887ecc 100644 --- a/SendGrid/Example/packages.config +++ b/SendGrid/Example/packages.config @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="8.0.3" targetFramework="net452" />
- <package id="SendGrid.CSharp.HTTP.Client" version="1.0.2" targetFramework="net45" />
+ <package id="SendGrid.CSharp.HTTP.Client" version="2.0.0" targetFramework="net45" />
<package id="SendGrid.SmtpApi" version="1.3.1" targetFramework="net45" />
</packages>
\ No newline at end of file |