Skip to main content

JsonHttpClient

Assembly: ServiceStack.HttpClient.dll
View Source
Declaration
public class JsonHttpClient : IJsonServiceClient, IServiceClient, IRestServiceClient, IServiceClientAsync, IServiceGatewayAsync, IServiceClientSync, IHasSessionId, IHasBearerToken, IHasVersion, IHttpRestClientAsync, IRestClientAsync, IReplyClient, IServiceGateway, IOneWayClient, IRestClient, IRestClientSync, IServiceClientCommon, IDisposable, IHasCookieContainer, IServiceClientMeta

Properties

GlobalHttpMessageHandlerFactory

View Source
Declaration
public static Func<HttpMessageHandler> GlobalHttpMessageHandlerFactory { get; set; }

HttpMessageHandler

View Source
Declaration
public HttpMessageHandler HttpMessageHandler { get; set; }

HttpClient

View Source
Declaration
public HttpClient HttpClient { get; set; }

CookieContainer

View Source
Declaration
public CookieContainer CookieContainer { get; set; }

ResultsFilter

View Source
Declaration
public ResultsFilterHttpDelegate ResultsFilter { get; set; }

ResultsFilterResponse

View Source
Declaration
public ResultsFilterHttpResponseDelegate ResultsFilterResponse { get; set; }

ExceptionFilter

View Source
Declaration
public ExceptionFilterHttpDelegate ExceptionFilter { get; set; }

BaseUri

View Source
Declaration
public string BaseUri { get; set; }

Format

View Source
Declaration
public string Format { get; }

RequestCompressionType

View Source
Declaration
public string RequestCompressionType { get; set; }

SyncReplyBaseUri

View Source
Declaration
public string SyncReplyBaseUri { get; set; }

AsyncOneWayBaseUri

View Source
Declaration
public string AsyncOneWayBaseUri { get; set; }

Version

View Source
Declaration
public int Version { get; set; }

SessionId

View Source
Declaration
public string SessionId { get; set; }

UserName

View Source
Declaration
public string UserName { get; set; }

Password

View Source
Declaration
public string Password { get; set; }

AlwaysSendBasicAuthHeader

View Source
Declaration
public bool AlwaysSendBasicAuthHeader { get; set; }

Credentials

View Source
Declaration
public ICredentials Credentials { get; set; }

BearerToken

View Source
Declaration
public string BearerToken { get; set; }

RefreshToken

View Source
Declaration
public string RefreshToken { get; set; }

RefreshTokenUri

View Source
Declaration
public string RefreshTokenUri { get; set; }

EnableAutoRefreshToken

View Source
Declaration
public bool EnableAutoRefreshToken { get; set; }

UseCookies

View Source
Declaration
public bool UseCookies { get; set; }

Headers

Gets the collection of headers to be added to outgoing requests.

View Source
Declaration
public NameValueCollection Headers { get; }

BasePath

Relative BasePath to use for predefined routes. Set with UseBasePath or WithBasePath() Always contains '/' prefix + '/' suffix, e.g. /api/

View Source
Declaration
public string BasePath { get; protected set; }

UseBasePath

Replace the Base reply/oneway paths to use a different prefix

View Source
Declaration
public string UseBasePath { set; }

UrlResolver

View Source
Declaration
public UrlResolverDelegate UrlResolver { get; set; }

TypedUrlResolver

View Source
Declaration
public TypedUrlResolverDelegate TypedUrlResolver { get; set; }

RequestFilter

View Source
Declaration
public Action<HttpRequestMessage> RequestFilter { get; set; }

GlobalRequestFilter

View Source
Declaration
public static Action<HttpRequestMessage> GlobalRequestFilter { get; set; }

ResponseFilter

View Source
Declaration
public Action<HttpResponseMessage> ResponseFilter { get; set; }

GlobalResponseFilter

View Source
Declaration
public static Action<HttpResponseMessage> GlobalResponseFilter { get; set; }

Fields

log

View Source
Declaration
public static ILog log

DefaultHttpMethod

View Source
Declaration
public const string DefaultHttpMethod = "POST"

DefaultUserAgent

View Source
Declaration
public static string DefaultUserAgent

ContentType

View Source
Declaration
public string ContentType

Methods

SetBaseUri(String)

View Source
Declaration
public JsonHttpClient SetBaseUri(string baseUri)
Returns

ServiceStack.JsonHttpClient

Parameters
TypeName
System.StringbaseUri

SetBaseUri(String, String)

View Source
Declaration
public JsonHttpClient SetBaseUri(string baseUri, string basePath)
Returns

ServiceStack.JsonHttpClient

Parameters
TypeName
System.StringbaseUri
System.StringbasePath

WithBasePath(String)

View Source
Declaration
public JsonHttpClient WithBasePath(string basePath)
Returns

ServiceStack.JsonHttpClient

Parameters
TypeName
System.StringbasePath

SetCredentials(String, String)

View Source
Declaration
public void SetCredentials(string userName, string password)
Parameters
TypeName
System.StringuserName
System.Stringpassword

ToAbsoluteUrl(String)

View Source
Declaration
public virtual string ToAbsoluteUrl(string relativeOrAbsoluteUrl)
Returns

System.String

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl

ResolveUrl(String, String)

View Source
Declaration
public virtual string ResolveUrl(string httpMethod, string relativeOrAbsoluteUrl)
Returns

System.String

Parameters
TypeName
System.StringhttpMethod
System.StringrelativeOrAbsoluteUrl

ResolveTypedUrl(String, Object)

View Source
Declaration
public virtual string ResolveTypedUrl(string httpMethod, object requestDto)
Returns

System.String

Parameters
TypeName
System.StringhttpMethod
System.ObjectrequestDto

GetHttpClient()

View Source
Declaration
public HttpClient GetHttpClient()
Returns

System.Net.Http.HttpClient

AddHeader(String, String)

View Source
Declaration
public void AddHeader(string name, string value)
Parameters
TypeName
System.Stringname
System.Stringvalue

SendAsync<TResponse>(String, String, Object, CancellationToken)

View Source
Declaration
public async Task<TResponse> SendAsync<TResponse>(string httpMethod, string absoluteUrl, object request, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringhttpMethod
System.StringabsoluteUrl
System.Objectrequest
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

ResultFilter<T>(T, HttpResponseMessage, String, String, Object)

View Source
Declaration
protected T ResultFilter<T>(T response, HttpResponseMessage httpRes, string httpMethod, string requestUri, object request)
Returns

<T>

Parameters
TypeName
<T>response
System.Net.Http.HttpResponseMessagehttpRes
System.StringhttpMethod
System.StringrequestUri
System.Objectrequest
Type Parameters
  • T

GetResponseBytes(Object)

View Source
Declaration
public static byte[] GetResponseBytes(object response)
Returns

System.Byte[]

Parameters
TypeName
System.Objectresponse

ToWebServiceException(HttpResponseMessage, Object, Func<Stream, Object>)

View Source
Declaration
public static WebServiceException ToWebServiceException(HttpResponseMessage httpRes, object response, Func<Stream, object> parseDtoFn)
Returns

ServiceStack.WebServiceException

Parameters
TypeName
System.Net.Http.HttpResponseMessagehttpRes
System.Objectresponse
System.Func<System.IO.Stream,System.Object>parseDtoFn

ThrowWebServiceException<TResponse>(HttpResponseMessage, Object, String, Object)

View Source
Declaration
public void ThrowWebServiceException<TResponse>(HttpResponseMessage httpRes, object request, string requestUri, object response)
Parameters
TypeName
System.Net.Http.HttpResponseMessagehttpRes
System.Objectrequest
System.StringrequestUri
System.Objectresponse
Type Parameters
  • TResponse

Send<TResponse>(Object)

View Source
Declaration
public virtual TResponse Send<TResponse>(object request)
Returns

<TResponse>

Parameters
TypeName
System.Objectrequest
Type Parameters
  • TResponse

SendAll<TResponse>(IEnumerable<Object>)

View Source
Declaration
public virtual List<TResponse> SendAll<TResponse>(IEnumerable<object> requests)
Returns

System.Collections.Generic.List<<TResponse>>

Parameters
TypeName
System.Collections.Generic.IEnumerable<System.Object>requests
Type Parameters
  • TResponse

Send<TResponse>(String, String, Object)

View Source
Declaration
public TResponse Send<TResponse>(string httpMethod, string relativeOrAbsoluteUrl, object request)
Returns

<TResponse>

Parameters
TypeName
System.StringhttpMethod
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
Type Parameters
  • TResponse

Publish(Object)

View Source
Declaration
public virtual void Publish(object request)
Parameters
TypeName
System.Objectrequest

PublishAll(IEnumerable<Object>)

View Source
Declaration
public void PublishAll(IEnumerable<object> requestDtos)
Parameters
TypeName
System.Collections.Generic.IEnumerable<System.Object>requestDtos

SendAsync<TResponse>(Object)

View Source
Declaration
public virtual Task<TResponse> SendAsync<TResponse>(object request)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.Objectrequest
Type Parameters
  • TResponse

SendAsync<TResponse>(Object, CancellationToken)

View Source
Declaration
public virtual async Task<TResponse> SendAsync<TResponse>(object request, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.Objectrequest
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

SendAllAsync<TResponse>(IEnumerable<Object>, CancellationToken)

View Source
Declaration
public virtual Task<List<TResponse>> SendAllAsync<TResponse>(IEnumerable<object> requests, CancellationToken token)
Returns

System.Threading.Tasks.Task<System.Collections.Generic.List<<TResponse>>>

Parameters
TypeName
System.Collections.Generic.IEnumerable<System.Object>requests
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PublishAsync(Object, CancellationToken)

View Source
Declaration
public virtual Task PublishAsync(object request, CancellationToken token)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Objectrequest
System.Threading.CancellationTokentoken

PublishAllAsync(IEnumerable<Object>, CancellationToken)

View Source
Declaration
public Task PublishAllAsync(IEnumerable<object> requests, CancellationToken token)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.Collections.Generic.IEnumerable<System.Object>requests
System.Threading.CancellationTokentoken

GetAsync<TResponse>(IReturn<TResponse>)

View Source
Declaration
public Task<TResponse> GetAsync<TResponse>(IReturn<TResponse> requestDto)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
Type Parameters
  • TResponse

GetAsync<TResponse>(IReturn<TResponse>, CancellationToken)

View Source
Declaration
public Task<TResponse> GetAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

GetAsync<TResponse>(Object)

View Source
Declaration
public Task<TResponse> GetAsync<TResponse>(object requestDto)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
Type Parameters
  • TResponse

GetAsync<TResponse>(Object, CancellationToken)

View Source
Declaration
public Task<TResponse> GetAsync<TResponse>(object requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

GetAsync<TResponse>(String)

View Source
Declaration
public Task<TResponse> GetAsync<TResponse>(string relativeOrAbsoluteUrl)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
Type Parameters
  • TResponse

GetAsync<TResponse>(String, CancellationToken)

View Source
Declaration
public Task<TResponse> GetAsync<TResponse>(string relativeOrAbsoluteUrl, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

GetAsync(IReturnVoid)

View Source
Declaration
public Task GetAsync(IReturnVoid requestDto)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto

GetAsync(IReturnVoid, CancellationToken)

View Source
Declaration
public Task GetAsync(IReturnVoid requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto
System.Threading.CancellationTokentoken

DeleteAsync<TResponse>(IReturn<TResponse>)

View Source
Declaration
public Task<TResponse> DeleteAsync<TResponse>(IReturn<TResponse> requestDto)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
Type Parameters
  • TResponse

DeleteAsync<TResponse>(IReturn<TResponse>, CancellationToken)

View Source
Declaration
public Task<TResponse> DeleteAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

DeleteAsync<TResponse>(Object)

View Source
Declaration
public Task<TResponse> DeleteAsync<TResponse>(object requestDto)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
Type Parameters
  • TResponse

DeleteAsync<TResponse>(Object, CancellationToken)

View Source
Declaration
public Task<TResponse> DeleteAsync<TResponse>(object requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

DeleteAsync<TResponse>(String)

View Source
Declaration
public Task<TResponse> DeleteAsync<TResponse>(string relativeOrAbsoluteUrl)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
Type Parameters
  • TResponse

DeleteAsync<TResponse>(String, CancellationToken)

View Source
Declaration
public Task<TResponse> DeleteAsync<TResponse>(string relativeOrAbsoluteUrl, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

DeleteAsync(IReturnVoid)

View Source
Declaration
public Task DeleteAsync(IReturnVoid requestDto)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto

DeleteAsync(IReturnVoid, CancellationToken)

View Source
Declaration
public Task DeleteAsync(IReturnVoid requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto
System.Threading.CancellationTokentoken

PostAsync<TResponse>(IReturn<TResponse>)

View Source
Declaration
public Task<TResponse> PostAsync<TResponse>(IReturn<TResponse> requestDto)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
Type Parameters
  • TResponse

PostAsync<TResponse>(IReturn<TResponse>, CancellationToken)

View Source
Declaration
public Task<TResponse> PostAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PostAsync<TResponse>(Object)

View Source
Declaration
public Task<TResponse> PostAsync<TResponse>(object requestDto)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
Type Parameters
  • TResponse

PostAsync<TResponse>(Object, CancellationToken)

View Source
Declaration
public Task<TResponse> PostAsync<TResponse>(object requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PostAsync<TResponse>(String, Object)

View Source
Declaration
public Task<TResponse> PostAsync<TResponse>(string relativeOrAbsoluteUrl, object request)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
Type Parameters
  • TResponse

PostAsync<TResponse>(String, Object, CancellationToken)

View Source
Declaration
public Task<TResponse> PostAsync<TResponse>(string relativeOrAbsoluteUrl, object request, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PostAsync(IReturnVoid)

View Source
Declaration
public Task PostAsync(IReturnVoid requestDto)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto

PostAsync(IReturnVoid, CancellationToken)

View Source
Declaration
public Task PostAsync(IReturnVoid requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto
System.Threading.CancellationTokentoken

PutAsync<TResponse>(IReturn<TResponse>)

View Source
Declaration
public Task<TResponse> PutAsync<TResponse>(IReturn<TResponse> requestDto)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
Type Parameters
  • TResponse

PutAsync<TResponse>(IReturn<TResponse>, CancellationToken)

View Source
Declaration
public Task<TResponse> PutAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PutAsync<TResponse>(Object)

View Source
Declaration
public Task<TResponse> PutAsync<TResponse>(object requestDto)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
Type Parameters
  • TResponse

PutAsync<TResponse>(Object, CancellationToken)

View Source
Declaration
public Task<TResponse> PutAsync<TResponse>(object requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PutAsync<TResponse>(String, Object)

View Source
Declaration
public Task<TResponse> PutAsync<TResponse>(string relativeOrAbsoluteUrl, object request)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
Type Parameters
  • TResponse

PutAsync<TResponse>(String, Object, CancellationToken)

View Source
Declaration
public Task<TResponse> PutAsync<TResponse>(string relativeOrAbsoluteUrl, object request, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PutAsync(IReturnVoid)

View Source
Declaration
public Task PutAsync(IReturnVoid requestDto)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto

PutAsync(IReturnVoid, CancellationToken)

View Source
Declaration
public Task PutAsync(IReturnVoid requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto
System.Threading.CancellationTokentoken

PatchAsync<TResponse>(IReturn<TResponse>)

View Source
Declaration
public Task<TResponse> PatchAsync<TResponse>(IReturn<TResponse> requestDto)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
Type Parameters
  • TResponse

PatchAsync<TResponse>(IReturn<TResponse>, CancellationToken)

View Source
Declaration
public Task<TResponse> PatchAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PatchAsync<TResponse>(Object)

View Source
Declaration
public Task<TResponse> PatchAsync<TResponse>(object requestDto)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
Type Parameters
  • TResponse

PatchAsync<TResponse>(Object, CancellationToken)

View Source
Declaration
public Task<TResponse> PatchAsync<TResponse>(object requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.ObjectrequestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PatchAsync<TResponse>(String, Object)

View Source
Declaration
public Task<TResponse> PatchAsync<TResponse>(string relativeOrAbsoluteUrl, object request)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
Type Parameters
  • TResponse

PatchAsync<TResponse>(String, Object, CancellationToken)

View Source
Declaration
public Task<TResponse> PatchAsync<TResponse>(string relativeOrAbsoluteUrl, object request, CancellationToken token)
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PatchAsync(IReturnVoid)

View Source
Declaration
public Task PatchAsync(IReturnVoid requestDto)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto

PatchAsync(IReturnVoid, CancellationToken)

View Source
Declaration
public Task PatchAsync(IReturnVoid requestDto, CancellationToken token)
Returns

System.Threading.Tasks.Task

Parameters
TypeName
ServiceStack.IReturnVoidrequestDto
System.Threading.CancellationTokentoken

CustomMethodAsync<TResponse>(String, IReturn<TResponse>, CancellationToken)

View Source
Declaration
public Task<TResponse> CustomMethodAsync<TResponse>(string httpVerb, IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringhttpVerb
ServiceStack.IReturn<T>requestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

CustomMethodAsync<TResponse>(String, Object, CancellationToken)

View Source
Declaration
public Task<TResponse> CustomMethodAsync<TResponse>(string httpVerb, object requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringhttpVerb
System.ObjectrequestDto
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

CustomMethodAsync(String, IReturnVoid, CancellationToken)

View Source
Declaration
public Task CustomMethodAsync(string httpVerb, IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task

Parameters
TypeName
System.StringhttpVerb
ServiceStack.IReturnVoidrequestDto
System.Threading.CancellationTokentoken

CustomMethodAsync<TResponse>(String, String, Object, CancellationToken)

View Source
Declaration
public Task<TResponse> CustomMethodAsync<TResponse>(string httpVerb, string relativeOrAbsoluteUrl, object request, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringhttpVerb
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

SendOneWay(Object)

View Source
Declaration
public void SendOneWay(object request)
Parameters
TypeName
System.Objectrequest

SendOneWay(Object, CancellationToken)

View Source
Declaration
public void SendOneWay(object request, CancellationToken token)
Parameters
TypeName
System.Objectrequest
System.Threading.CancellationTokentoken

SendOneWay(String, Object)

View Source
Declaration
public void SendOneWay(string relativeOrAbsoluteUrl, object request)
Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Objectrequest

SendOneWay(String, Object, CancellationToken)

View Source
Declaration
public void SendOneWay(string relativeOrAbsoluteUrl, object request, CancellationToken token)
Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
System.Threading.CancellationTokentoken

SendAllOneWay(IEnumerable<Object>)

View Source
Declaration
public void SendAllOneWay(IEnumerable<object> requests)
Parameters
TypeName
System.Collections.Generic.IEnumerable<System.Object>requests

SendAllOneWay(IEnumerable<Object>, CancellationToken)

View Source
Declaration
public void SendAllOneWay(IEnumerable<object> requests, CancellationToken token)
Parameters
TypeName
System.Collections.Generic.IEnumerable<System.Object>requests
System.Threading.CancellationTokentoken

ClearCookies()

View Source
Declaration
public void ClearCookies()

GetCookieValues()

View Source
Declaration
public Dictionary<string, string> GetCookieValues()
Returns

System.Collections.Generic.Dictionary<System.String,System.String>

SetCookie(String, String, Nullable<TimeSpan>)

View Source
Declaration
public void SetCookie(string name, string value, TimeSpan? expiresIn = null)
Parameters
TypeName
System.Stringname
System.Stringvalue
System.Nullable<System.TimeSpan>expiresIn

Get(IReturnVoid)

View Source
Declaration
public void Get(IReturnVoid request)
Parameters
TypeName
ServiceStack.IReturnVoidrequest

Get<TResponse>(IReturn<TResponse>)

View Source
Declaration
public TResponse Get<TResponse>(IReturn<TResponse> request)
Returns

<TResponse>

Parameters
TypeName
ServiceStack.IReturn<T>request
Type Parameters
  • TResponse

Get<TResponse>(Object)

View Source
Declaration
public TResponse Get<TResponse>(object request)
Returns

<TResponse>

Parameters
TypeName
System.Objectrequest
Type Parameters
  • TResponse

Get<TResponse>(String)

View Source
Declaration
public TResponse Get<TResponse>(string relativeOrAbsoluteUrl)
Returns

<TResponse>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
Type Parameters
  • TResponse

GetLazy<TResponse>(IReturn<QueryResponse<TResponse>>)

View Source
Declaration
public IEnumerable<TResponse> GetLazy<TResponse>(IReturn<QueryResponse<TResponse>> queryDto)
Returns

System.Collections.Generic.IEnumerable<<TResponse>>

Parameters
TypeName
ServiceStack.IReturn<T>queryDto
Type Parameters
  • TResponse

Delete(IReturnVoid)

View Source
Declaration
public void Delete(IReturnVoid requestDto)
Parameters
TypeName
ServiceStack.IReturnVoidrequestDto

Delete<TResponse>(IReturn<TResponse>)

View Source
Declaration
public TResponse Delete<TResponse>(IReturn<TResponse> request)
Returns

<TResponse>

Parameters
TypeName
ServiceStack.IReturn<T>request
Type Parameters
  • TResponse

Delete<TResponse>(Object)

View Source
Declaration
public TResponse Delete<TResponse>(object request)
Returns

<TResponse>

Parameters
TypeName
System.Objectrequest
Type Parameters
  • TResponse

Delete<TResponse>(String)

View Source
Declaration
public TResponse Delete<TResponse>(string relativeOrAbsoluteUrl)
Returns

<TResponse>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
Type Parameters
  • TResponse

Post(IReturnVoid)

View Source
Declaration
public void Post(IReturnVoid requestDto)
Parameters
TypeName
ServiceStack.IReturnVoidrequestDto

Post<TResponse>(IReturn<TResponse>)

View Source
Declaration
public TResponse Post<TResponse>(IReturn<TResponse> request)
Returns

<TResponse>

Parameters
TypeName
ServiceStack.IReturn<T>request
Type Parameters
  • TResponse

Post<TResponse>(Object)

View Source
Declaration
public TResponse Post<TResponse>(object request)
Returns

<TResponse>

Parameters
TypeName
System.Objectrequest
Type Parameters
  • TResponse

Post<TResponse>(String, Object)

View Source
Declaration
public TResponse Post<TResponse>(string relativeOrAbsoluteUrl, object request)
Returns

<TResponse>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
Type Parameters
  • TResponse

Put(IReturnVoid)

View Source
Declaration
public void Put(IReturnVoid requestDto)
Parameters
TypeName
ServiceStack.IReturnVoidrequestDto

Put<TResponse>(IReturn<TResponse>)

View Source
Declaration
public TResponse Put<TResponse>(IReturn<TResponse> request)
Returns

<TResponse>

Parameters
TypeName
ServiceStack.IReturn<T>request
Type Parameters
  • TResponse

Put<TResponse>(Object)

View Source
Declaration
public TResponse Put<TResponse>(object request)
Returns

<TResponse>

Parameters
TypeName
System.Objectrequest
Type Parameters
  • TResponse

Put<TResponse>(String, Object)

View Source
Declaration
public TResponse Put<TResponse>(string relativeOrAbsoluteUrl, object request)
Returns

<TResponse>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
Type Parameters
  • TResponse

Patch(IReturnVoid)

View Source
Declaration
public void Patch(IReturnVoid request)
Parameters
TypeName
ServiceStack.IReturnVoidrequest

Patch<TResponse>(IReturn<TResponse>)

View Source
Declaration
public TResponse Patch<TResponse>(IReturn<TResponse> request)
Returns

<TResponse>

Parameters
TypeName
ServiceStack.IReturn<T>request
Type Parameters
  • TResponse

Patch<TResponse>(Object)

View Source
Declaration
public TResponse Patch<TResponse>(object request)
Returns

<TResponse>

Parameters
TypeName
System.Objectrequest
Type Parameters
  • TResponse

Patch<TResponse>(String, Object)

View Source
Declaration
public TResponse Patch<TResponse>(string relativeOrAbsoluteUrl, object request)
Returns

<TResponse>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
Type Parameters
  • TResponse

CustomMethod(String, IReturnVoid)

View Source
Declaration
public void CustomMethod(string httpVerb, IReturnVoid request)
Parameters
TypeName
System.StringhttpVerb
ServiceStack.IReturnVoidrequest

CustomMethod<TResponse>(String, IReturn<TResponse>)

View Source
Declaration
public TResponse CustomMethod<TResponse>(string httpVerb, IReturn<TResponse> request)
Returns

<TResponse>

Parameters
TypeName
System.StringhttpVerb
ServiceStack.IReturn<T>request
Type Parameters
  • TResponse

CustomMethod<TResponse>(String, Object)

View Source
Declaration
public TResponse CustomMethod<TResponse>(string httpVerb, object request)
Returns

<TResponse>

Parameters
TypeName
System.StringhttpVerb
System.Objectrequest
Type Parameters
  • TResponse

GetHttpMethod(Object)

View Source
Declaration
public string GetHttpMethod(object request)
Returns

System.String

Parameters
TypeName
System.Objectrequest

PostFileAsync<TResponse>(String, Stream, String, String, String, CancellationToken)

View Source
Declaration
public virtual async Task<TResponse> PostFileAsync<TResponse>(string relativeOrAbsoluteUrl, Stream fileToUpload, string fileName, string mimeType = null, string fieldName = "file", CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.IO.StreamfileToUpload
System.StringfileName
System.StringmimeType
System.StringfieldName
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PostFile<TResponse>(String, Stream, String, String, String)

View Source
Declaration
public TResponse PostFile<TResponse>(string relativeOrAbsoluteUrl, Stream fileToUpload, string fileName, string mimeType, string fieldName = "file")
Returns

<TResponse>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.IO.StreamfileToUpload
System.StringfileName
System.StringmimeType
System.StringfieldName
Type Parameters
  • TResponse

PostFileWithRequestAsync<TResponse>(Stream, String, Object, String, CancellationToken)

View Source
Declaration
public Task<TResponse> PostFileWithRequestAsync<TResponse>(Stream fileToUpload, string fileName, object request, string fieldName = "file", CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.IO.StreamfileToUpload
System.StringfileName
System.Objectrequest
System.StringfieldName
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PostFileWithRequest<TResponse>(Stream, String, Object, String)

View Source
Declaration
public TResponse PostFileWithRequest<TResponse>(Stream fileToUpload, string fileName, object request, string fieldName = "file")
Returns

<TResponse>

Parameters
TypeName
System.IO.StreamfileToUpload
System.StringfileName
System.Objectrequest
System.StringfieldName
Type Parameters
  • TResponse

PostFileWithRequestAsync<TResponse>(String, Stream, String, Object, String, CancellationToken)

View Source
Declaration
public virtual async Task<TResponse> PostFileWithRequestAsync<TResponse>(string relativeOrAbsoluteUrl, Stream fileToUpload, string fileName, object request, string fieldName = "file", CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.IO.StreamfileToUpload
System.StringfileName
System.Objectrequest
System.StringfieldName
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PostFileWithRequest<TResponse>(String, Stream, String, Object, String)

View Source
Declaration
public TResponse PostFileWithRequest<TResponse>(string relativeOrAbsoluteUrl, Stream fileToUpload, string fileName, object request, string fieldName = "file")
Returns

<TResponse>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.IO.StreamfileToUpload
System.StringfileName
System.Objectrequest
System.StringfieldName
Type Parameters
  • TResponse

PostFilesWithRequest<TResponse>(Object, IEnumerable<UploadFile>)

View Source
Declaration
public TResponse PostFilesWithRequest<TResponse>(object request, IEnumerable<UploadFile> files)
Returns

<TResponse>

Parameters
TypeName
System.Objectrequest
System.Collections.Generic.IEnumerable<ServiceStack.UploadFile>files
Type Parameters
  • TResponse

PostFilesWithRequest<TResponse>(String, Object, IEnumerable<UploadFile>)

View Source
Declaration
public TResponse PostFilesWithRequest<TResponse>(string relativeOrAbsoluteUrl, object request, IEnumerable<UploadFile> files)
Returns

<TResponse>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
System.Collections.Generic.IEnumerable<ServiceStack.UploadFile>files
Type Parameters
  • TResponse

PostFilesWithRequestAsync<TResponse>(Object, IEnumerable<UploadFile>, CancellationToken)

View Source
Declaration
public Task<TResponse> PostFilesWithRequestAsync<TResponse>(object request, IEnumerable<UploadFile> files, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.Objectrequest
System.Collections.Generic.IEnumerable<ServiceStack.UploadFile>files
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PostFilesWithRequestAsync<TResponse>(String, Object, IEnumerable<UploadFile>, CancellationToken)

View Source
Declaration
public Task<TResponse> PostFilesWithRequestAsync<TResponse>(string relativeOrAbsoluteUrl, object request, IEnumerable<UploadFile> files, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
System.Collections.Generic.IEnumerable<ServiceStack.UploadFile>files
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

PostFilesWithRequestAsync<TResponse>(String, Object, UploadFile[], CancellationToken)

View Source
Declaration
public virtual async Task<TResponse> PostFilesWithRequestAsync<TResponse>(string requestUri, object request, UploadFile[] files, CancellationToken token = default(CancellationToken))
Returns

System.Threading.Tasks.Task<<TResponse>>

Parameters
TypeName
System.StringrequestUri
System.Objectrequest
ServiceStack.UploadFile[]files
System.Threading.CancellationTokentoken
Type Parameters
  • TResponse

CancelAsync()

View Source
Declaration
public void CancelAsync()

Dispose()

View Source
Declaration
public void Dispose()

Implements