Skip to main content

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​
TypeName
System.Net.Http.Headers.HttpResponseHeadersheaders

ToWebHeaderCollection(HttpResponseHeaders)​

View Source​
Declaration
public static WebHeaderCollection ToWebHeaderCollection(this HttpResponseHeaders headers)
Returns​

System.Net.WebHeaderCollection

Parameters​
TypeName
System.Net.Http.Headers.HttpResponseHeadersheaders

GetContentType(HttpResponseMessage)​

View Source​
Declaration
public static string GetContentType(this HttpResponseMessage httpRes)
Returns​

System.String

Parameters​
TypeName
System.Net.Http.HttpResponseMessagehttpRes

AddBasicAuth(HttpRequestMessage, String)​

View Source​
Declaration
public static void AddBasicAuth(this HttpRequestMessage request, string basicAuthKey)
Parameters​
TypeName
System.Net.Http.HttpRequestMessagerequest
System.StringbasicAuthKey

AddBasicAuth(HttpRequestMessage, String, String)​

View Source​
Declaration
public static void AddBasicAuth(this HttpRequestMessage request, string userName, string password)
Parameters​
TypeName
System.Net.Http.HttpRequestMessagerequest
System.StringuserName
System.Stringpassword

AddApiKeyAuth(HttpRequestMessage, String)​

View Source​
Declaration
public static void AddApiKeyAuth(this HttpRequestMessage request, string apiKey)
Parameters​
TypeName
System.Net.Http.HttpRequestMessagerequest
System.StringapiKey

AddBearerToken(HttpRequestMessage, String)​

View Source​
Declaration
public static void AddBearerToken(this HttpRequestMessage request, string bearerToken)
Parameters​
TypeName
System.Net.Http.HttpRequestMessagerequest
System.StringbearerToken