JsonApiClientUtils
Assembly: ServiceStack.HttpClient.dll
View Source
Declaration
public static class JsonApiClientUtils
Methods
ToDictionary(HttpResponseHeaders)
View Source
Declaration
public static Dictionary<string, string> ToDictionary(this HttpResponseHeaders headers)
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
Parameters
Type | Name |
---|---|
System.Net.Http.Headers.HttpResponseHeaders | headers |
ToWebHeaderCollection(HttpResponseHeaders)
View Source
Declaration
public static WebHeaderCollection ToWebHeaderCollection(this HttpResponseHeaders headers)
Returns
System.Net.WebHeaderCollection
Parameters
Type | Name |
---|---|
System.Net.Http.Headers.HttpResponseHeaders | headers |
GetContentType(HttpResponseMessage)
View Source
Declaration
public static string GetContentType(this HttpResponseMessage httpRes)
Returns
System.String
Parameters
Type | Name |
---|---|
System.Net.Http.HttpResponseMessage | httpRes |
AddBasicAuth(HttpRequestMessage, String)
View Source
Declaration
public static void AddBasicAuth(this HttpRequestMessage request, string basicAuthKey)
Parameters
Type | Name |
---|---|
System.Net.Http.HttpRequestMessage | request |
System.String | basicAuthKey |
AddBasicAuth(HttpRequestMessage, String, String)
View Source
Declaration
public static void AddBasicAuth(this HttpRequestMessage request, string userName, string password)
Parameters
Type | Name |
---|---|
System.Net.Http.HttpRequestMessage | request |
System.String | userName |
System.String | password |
AddApiKeyAuth(HttpRequestMessage, String)
View Source
Declaration
public static void AddApiKeyAuth(this HttpRequestMessage request, string apiKey)
Parameters
Type | Name |
---|---|
System.Net.Http.HttpRequestMessage | request |
System.String | apiKey |
AddBearerToken(HttpRequestMessage, String)
View Source
Declaration
public static void AddBearerToken(this HttpRequestMessage request, string bearerToken)
Parameters
Type | Name |
---|---|
System.Net.Http.HttpRequestMessage | request |
System.String | bearerToken |