Class WebResponseExtensions
Extension methods for HttpWebResponse
Inheritance
System.Object
WebResponseExtensions
Namespace: ImageVault.Common.Lib.Web
Assembly: ImageVault.Common.dll
Syntax
public static class WebResponseExtensions : Object
Methods
ReadAllContentAsJsonAsync(WebResponse)
Read all data as a JToken object
Declaration
public static Task<JToken> ReadAllContentAsJsonAsync(this WebResponse response)
Parameters
Type | Name | Description |
---|---|---|
System.Net.WebResponse | response |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<Newtonsoft.Json.Linq.JToken> |
ReadAllContentAsString(WebResponse)
Read all content from the response
Declaration
public static string ReadAllContentAsString(this WebResponse response)
Parameters
Type | Name | Description |
---|---|---|
System.Net.WebResponse | response |
Returns
Type | Description |
---|---|
System.String |
ReadAllContentAsStringAsync(WebResponse)
Read all content from the response
Declaration
public static Task<string> ReadAllContentAsStringAsync(this WebResponse response)
Parameters
Type | Name | Description |
---|---|---|
System.Net.WebResponse | response |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> |