JsonHttpClient
Assembly: ServiceStack.HttpClient.dll
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
Declaration
public static Func<HttpMessageHandler> GlobalHttpMessageHandlerFactory { get; set; }
HttpMessageHandler
Declaration
public HttpMessageHandler HttpMessageHandler { get; set; }
HttpClient
Declaration
public HttpClient HttpClient { get; set; }
CookieContainer
Declaration
public CookieContainer CookieContainer { get; set; }
ResultsFilter
Declaration
public ResultsFilterHttpDelegate ResultsFilter { get; set; }
ResultsFilterResponse
Declaration
public ResultsFilterHttpResponseDelegate ResultsFilterResponse { get; set; }
ExceptionFilter
Declaration
public ExceptionFilterHttpDelegate ExceptionFilter { get; set; }
BaseUri
Declaration
public string BaseUri { get; set; }
Declaration
public string Format { get; }
RequestCompressionType
Declaration
public string RequestCompressionType { get; set; }
SyncReplyBaseUri
Declaration
public string SyncReplyBaseUri { get; set; }
AsyncOneWayBaseUri
Declaration
public string AsyncOneWayBaseUri { get; set; }
Version
Declaration
public int Version { get; set; }
SessionId
Declaration
public string SessionId { get; set; }
UserName
Declaration
public string UserName { get; set; }
Password
Declaration
public string Password { get; set; }
Declaration
public bool AlwaysSendBasicAuthHeader { get; set; }
Credentials
Declaration
public ICredentials Credentials { get; set; }
BearerToken
Declaration
public string BearerToken { get; set; }
RefreshToken
Declaration
public string RefreshToken { get; set; }
RefreshTokenUri
Declaration
public string RefreshTokenUri { get; set; }
EnableAutoRefreshToken
Declaration
public bool EnableAutoRefreshToken { get; set; }
UseCookies
Declaration
public bool UseCookies { get; set; }
Gets the collection of headers to be added to outgoing requests.
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/
Declaration
public string BasePath { get; protected set; }
UseBasePath
Replace the Base reply/oneway paths to use a different prefix
Declaration
public string UseBasePath { set; }
UrlResolver
Declaration
public UrlResolverDelegate UrlResolver { get; set; }
TypedUrlResolver
Declaration
public TypedUrlResolverDelegate TypedUrlResolver { get; set; }
RequestFilter
Declaration
public Action<HttpRequestMessage> RequestFilter { get; set; }
GlobalRequestFilter
Declaration
public static Action<HttpRequestMessage> GlobalRequestFilter { get; set; }
ResponseFilter
Declaration
public Action<HttpResponseMessage> ResponseFilter { get; set; }
GlobalResponseFilter
Declaration
public static Action<HttpResponseMessage> GlobalResponseFilter { get; set; }
Fields
log
DefaultHttpMethod
Declaration
public const string DefaultHttpMethod = "POST"
DefaultUserAgent
Declaration
public static string DefaultUserAgent
ContentType
Declaration
public string ContentType
Methods
SetBaseUri(String)
Declaration
public JsonHttpClient SetBaseUri(string baseUri)
Returns
ServiceStack.JsonHttpClient
Parameters
Type | Name |
---|
System.String | baseUri |
SetBaseUri(String, String)
Declaration
public JsonHttpClient SetBaseUri(string baseUri, string basePath)
Returns
ServiceStack.JsonHttpClient
Parameters
Type | Name |
---|
System.String | baseUri |
System.String | basePath |
WithBasePath(String)
Declaration
public JsonHttpClient WithBasePath(string basePath)
Returns
ServiceStack.JsonHttpClient
Parameters
Type | Name |
---|
System.String | basePath |
SetCredentials(String, String)
Declaration
public void SetCredentials(string userName, string password)
Parameters
Type | Name |
---|
System.String | userName |
System.String | password |
ToAbsoluteUrl(String)
Declaration
public virtual string ToAbsoluteUrl(string relativeOrAbsoluteUrl)
Returns
System.String
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
ResolveUrl(String, String)
Declaration
public virtual string ResolveUrl(string httpMethod, string relativeOrAbsoluteUrl)
Returns
System.String
Parameters
Type | Name |
---|
System.String | httpMethod |
System.String | relativeOrAbsoluteUrl |
ResolveTypedUrl(String, Object)
Declaration
public virtual string ResolveTypedUrl(string httpMethod, object requestDto)
Returns
System.String
Parameters
Type | Name |
---|
System.String | httpMethod |
System.Object | requestDto |
GetHttpClient()
Declaration
public HttpClient GetHttpClient()
Returns
System.Net.Http.HttpClient
Declaration
public void AddHeader(string name, string value)
Parameters
Type | Name |
---|
System.String | name |
System.String | value |
SendAsync<TResponse>(String, String, Object, CancellationToken)
Declaration
public async Task<TResponse> SendAsync<TResponse>(string httpMethod, string absoluteUrl, object request, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | httpMethod |
System.String | absoluteUrl |
System.Object | request |
System.Threading.CancellationToken | token |
Type Parameters
ResultFilter<T>(T, HttpResponseMessage, String, String, Object)
Declaration
protected T ResultFilter<T>(T response, HttpResponseMessage httpRes, string httpMethod, string requestUri, object request)
Returns
<T>
Parameters
Type | Name |
---|
<T> | response |
System.Net.Http.HttpResponseMessage | httpRes |
System.String | httpMethod |
System.String | requestUri |
System.Object | request |
Type Parameters
GetResponseBytes(Object)
Declaration
public static byte[] GetResponseBytes(object response)
Returns
System.Byte[]
Parameters
Type | Name |
---|
System.Object | response |
ToWebServiceException(HttpResponseMessage, Object, Func<Stream, Object>)
Declaration
public static WebServiceException ToWebServiceException(HttpResponseMessage httpRes, object response, Func<Stream, object> parseDtoFn)
Returns
ServiceStack.WebServiceException
Parameters
Type | Name |
---|
System.Net.Http.HttpResponseMessage | httpRes |
System.Object | response |
System.Func<System.IO.Stream,System.Object> | parseDtoFn |
ThrowWebServiceException<TResponse>(HttpResponseMessage, Object, String, Object)
Declaration
public void ThrowWebServiceException<TResponse>(HttpResponseMessage httpRes, object request, string requestUri, object response)
Parameters
Type | Name |
---|
System.Net.Http.HttpResponseMessage | httpRes |
System.Object | request |
System.String | requestUri |
System.Object | response |
Type Parameters
Send<TResponse>(Object)
Declaration
public virtual TResponse Send<TResponse>(object request)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.Object | request |
Type Parameters
SendAll<TResponse>(IEnumerable<Object>)
Declaration
public virtual List<TResponse> SendAll<TResponse>(IEnumerable<object> requests)
Returns
System.Collections.Generic.List<<TResponse>>
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<System.Object> | requests |
Type Parameters
Send<TResponse>(String, String, Object)
Declaration
public TResponse Send<TResponse>(string httpMethod, string relativeOrAbsoluteUrl, object request)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.String | httpMethod |
System.String | relativeOrAbsoluteUrl |
System.Object | request |
Type Parameters
Publish(Object)
Declaration
public virtual void Publish(object request)
Parameters
Type | Name |
---|
System.Object | request |
PublishAll(IEnumerable<Object>)
Declaration
public void PublishAll(IEnumerable<object> requestDtos)
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<System.Object> | requestDtos |
SendAsync<TResponse>(Object)
Declaration
public virtual Task<TResponse> SendAsync<TResponse>(object request)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | request |
Type Parameters
SendAsync<TResponse>(Object, CancellationToken)
Declaration
public virtual async Task<TResponse> SendAsync<TResponse>(object request, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | request |
System.Threading.CancellationToken | token |
Type Parameters
SendAllAsync<TResponse>(IEnumerable<Object>, CancellationToken)
Declaration
public virtual Task<List<TResponse>> SendAllAsync<TResponse>(IEnumerable<object> requests, CancellationToken token)
Returns
System.Threading.Tasks.Task<System.Collections.Generic.List<<TResponse>>>
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<System.Object> | requests |
System.Threading.CancellationToken | token |
Type Parameters
PublishAsync(Object, CancellationToken)
Declaration
public virtual Task PublishAsync(object request, CancellationToken token)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.Object | request |
System.Threading.CancellationToken | token |
PublishAllAsync(IEnumerable<Object>, CancellationToken)
Declaration
public Task PublishAllAsync(IEnumerable<object> requests, CancellationToken token)
Returns
System.Threading.Tasks.Task
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<System.Object> | requests |
System.Threading.CancellationToken | token |
GetAsync<TResponse>(IReturn<TResponse>)
Declaration
public Task<TResponse> GetAsync<TResponse>(IReturn<TResponse> requestDto)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
GetAsync<TResponse>(IReturn<TResponse>, CancellationToken)
Declaration
public Task<TResponse> GetAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
GetAsync<TResponse>(Object)
Declaration
public Task<TResponse> GetAsync<TResponse>(object requestDto)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
Type Parameters
GetAsync<TResponse>(Object, CancellationToken)
Declaration
public Task<TResponse> GetAsync<TResponse>(object requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
System.Threading.CancellationToken | token |
Type Parameters
GetAsync<TResponse>(String)
Declaration
public Task<TResponse> GetAsync<TResponse>(string relativeOrAbsoluteUrl)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
Type Parameters
GetAsync<TResponse>(String, CancellationToken)
Declaration
public Task<TResponse> GetAsync<TResponse>(string relativeOrAbsoluteUrl, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Threading.CancellationToken | token |
Type Parameters
GetAsync(IReturnVoid)
Declaration
public Task GetAsync(IReturnVoid requestDto)
Returns
System.Threading.Tasks.Task
Parameters
GetAsync(IReturnVoid, CancellationToken)
Declaration
public Task GetAsync(IReturnVoid requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task
Parameters
DeleteAsync<TResponse>(IReturn<TResponse>)
Declaration
public Task<TResponse> DeleteAsync<TResponse>(IReturn<TResponse> requestDto)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
DeleteAsync<TResponse>(IReturn<TResponse>, CancellationToken)
Declaration
public Task<TResponse> DeleteAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
DeleteAsync<TResponse>(Object)
Declaration
public Task<TResponse> DeleteAsync<TResponse>(object requestDto)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
Type Parameters
DeleteAsync<TResponse>(Object, CancellationToken)
Declaration
public Task<TResponse> DeleteAsync<TResponse>(object requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
System.Threading.CancellationToken | token |
Type Parameters
DeleteAsync<TResponse>(String)
Declaration
public Task<TResponse> DeleteAsync<TResponse>(string relativeOrAbsoluteUrl)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
Type Parameters
DeleteAsync<TResponse>(String, CancellationToken)
Declaration
public Task<TResponse> DeleteAsync<TResponse>(string relativeOrAbsoluteUrl, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Threading.CancellationToken | token |
Type Parameters
DeleteAsync(IReturnVoid)
Declaration
public Task DeleteAsync(IReturnVoid requestDto)
Returns
System.Threading.Tasks.Task
Parameters
DeleteAsync(IReturnVoid, CancellationToken)
Declaration
public Task DeleteAsync(IReturnVoid requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task
Parameters
PostAsync<TResponse>(IReturn<TResponse>)
Declaration
public Task<TResponse> PostAsync<TResponse>(IReturn<TResponse> requestDto)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
PostAsync<TResponse>(IReturn<TResponse>, CancellationToken)
Declaration
public Task<TResponse> PostAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
PostAsync<TResponse>(Object)
Declaration
public Task<TResponse> PostAsync<TResponse>(object requestDto)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
Type Parameters
PostAsync<TResponse>(Object, CancellationToken)
Declaration
public Task<TResponse> PostAsync<TResponse>(object requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
System.Threading.CancellationToken | token |
Type Parameters
PostAsync<TResponse>(String, Object)
Declaration
public Task<TResponse> PostAsync<TResponse>(string relativeOrAbsoluteUrl, object request)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
Type Parameters
PostAsync<TResponse>(String, Object, CancellationToken)
Declaration
public Task<TResponse> PostAsync<TResponse>(string relativeOrAbsoluteUrl, object request, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
System.Threading.CancellationToken | token |
Type Parameters
PostAsync(IReturnVoid)
Declaration
public Task PostAsync(IReturnVoid requestDto)
Returns
System.Threading.Tasks.Task
Parameters
PostAsync(IReturnVoid, CancellationToken)
Declaration
public Task PostAsync(IReturnVoid requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task
Parameters
PutAsync<TResponse>(IReturn<TResponse>)
Declaration
public Task<TResponse> PutAsync<TResponse>(IReturn<TResponse> requestDto)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
PutAsync<TResponse>(IReturn<TResponse>, CancellationToken)
Declaration
public Task<TResponse> PutAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
PutAsync<TResponse>(Object)
Declaration
public Task<TResponse> PutAsync<TResponse>(object requestDto)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
Type Parameters
PutAsync<TResponse>(Object, CancellationToken)
Declaration
public Task<TResponse> PutAsync<TResponse>(object requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
System.Threading.CancellationToken | token |
Type Parameters
PutAsync<TResponse>(String, Object)
Declaration
public Task<TResponse> PutAsync<TResponse>(string relativeOrAbsoluteUrl, object request)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
Type Parameters
PutAsync<TResponse>(String, Object, CancellationToken)
Declaration
public Task<TResponse> PutAsync<TResponse>(string relativeOrAbsoluteUrl, object request, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
System.Threading.CancellationToken | token |
Type Parameters
PutAsync(IReturnVoid)
Declaration
public Task PutAsync(IReturnVoid requestDto)
Returns
System.Threading.Tasks.Task
Parameters
PutAsync(IReturnVoid, CancellationToken)
Declaration
public Task PutAsync(IReturnVoid requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task
Parameters
PatchAsync<TResponse>(IReturn<TResponse>)
Declaration
public Task<TResponse> PatchAsync<TResponse>(IReturn<TResponse> requestDto)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
PatchAsync<TResponse>(IReturn<TResponse>, CancellationToken)
Declaration
public Task<TResponse> PatchAsync<TResponse>(IReturn<TResponse> requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
PatchAsync<TResponse>(Object)
Declaration
public Task<TResponse> PatchAsync<TResponse>(object requestDto)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
Type Parameters
PatchAsync<TResponse>(Object, CancellationToken)
Declaration
public Task<TResponse> PatchAsync<TResponse>(object requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | requestDto |
System.Threading.CancellationToken | token |
Type Parameters
PatchAsync<TResponse>(String, Object)
Declaration
public Task<TResponse> PatchAsync<TResponse>(string relativeOrAbsoluteUrl, object request)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
Type Parameters
PatchAsync<TResponse>(String, Object, CancellationToken)
Declaration
public Task<TResponse> PatchAsync<TResponse>(string relativeOrAbsoluteUrl, object request, CancellationToken token)
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
System.Threading.CancellationToken | token |
Type Parameters
PatchAsync(IReturnVoid)
Declaration
public Task PatchAsync(IReturnVoid requestDto)
Returns
System.Threading.Tasks.Task
Parameters
PatchAsync(IReturnVoid, CancellationToken)
Declaration
public Task PatchAsync(IReturnVoid requestDto, CancellationToken token)
Returns
System.Threading.Tasks.Task
Parameters
CustomMethodAsync<TResponse>(String, IReturn<TResponse>, CancellationToken)
Declaration
public Task<TResponse> CustomMethodAsync<TResponse>(string httpVerb, IReturn<TResponse> requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type Parameters
CustomMethodAsync<TResponse>(String, Object, CancellationToken)
Declaration
public Task<TResponse> CustomMethodAsync<TResponse>(string httpVerb, object requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | httpVerb |
System.Object | requestDto |
System.Threading.CancellationToken | token |
Type Parameters
CustomMethodAsync(String, IReturnVoid, CancellationToken)
Declaration
public Task CustomMethodAsync(string httpVerb, IReturnVoid requestDto, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task
Parameters
CustomMethodAsync<TResponse>(String, String, Object, CancellationToken)
Declaration
public Task<TResponse> CustomMethodAsync<TResponse>(string httpVerb, string relativeOrAbsoluteUrl, object request, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | httpVerb |
System.String | relativeOrAbsoluteUrl |
System.Object | request |
System.Threading.CancellationToken | token |
Type Parameters
SendOneWay(Object)
Declaration
public void SendOneWay(object request)
Parameters
Type | Name |
---|
System.Object | request |
SendOneWay(Object, CancellationToken)
Declaration
public void SendOneWay(object request, CancellationToken token)
Parameters
Type | Name |
---|
System.Object | request |
System.Threading.CancellationToken | token |
SendOneWay(String, Object)
Declaration
public void SendOneWay(string relativeOrAbsoluteUrl, object request)
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
SendOneWay(String, Object, CancellationToken)
Declaration
public void SendOneWay(string relativeOrAbsoluteUrl, object request, CancellationToken token)
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
System.Threading.CancellationToken | token |
SendAllOneWay(IEnumerable<Object>)
Declaration
public void SendAllOneWay(IEnumerable<object> requests)
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<System.Object> | requests |
SendAllOneWay(IEnumerable<Object>, CancellationToken)
Declaration
public void SendAllOneWay(IEnumerable<object> requests, CancellationToken token)
Parameters
Type | Name |
---|
System.Collections.Generic.IEnumerable<System.Object> | requests |
System.Threading.CancellationToken | token |
ClearCookies()
Declaration
public void ClearCookies()
GetCookieValues()
Declaration
public Dictionary<string, string> GetCookieValues()
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
SetCookie(String, String, Nullable<TimeSpan>)
Declaration
public void SetCookie(string name, string value, TimeSpan? expiresIn = null)
Parameters
Type | Name |
---|
System.String | name |
System.String | value |
System.Nullable<System.TimeSpan> | expiresIn |
Get(IReturnVoid)
Declaration
public void Get(IReturnVoid request)
Parameters
Get<TResponse>(IReturn<TResponse>)
Declaration
public TResponse Get<TResponse>(IReturn<TResponse> request)
Returns
<TResponse>
Parameters
Type Parameters
Get<TResponse>(Object)
Declaration
public TResponse Get<TResponse>(object request)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.Object | request |
Type Parameters
Get<TResponse>(String)
Declaration
public TResponse Get<TResponse>(string relativeOrAbsoluteUrl)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
Type Parameters
GetLazy<TResponse>(IReturn<QueryResponse<TResponse>>)
Declaration
public IEnumerable<TResponse> GetLazy<TResponse>(IReturn<QueryResponse<TResponse>> queryDto)
Returns
System.Collections.Generic.IEnumerable<<TResponse>>
Parameters
Type Parameters
Delete(IReturnVoid)
Declaration
public void Delete(IReturnVoid requestDto)
Parameters
Delete<TResponse>(IReturn<TResponse>)
Declaration
public TResponse Delete<TResponse>(IReturn<TResponse> request)
Returns
<TResponse>
Parameters
Type Parameters
Delete<TResponse>(Object)
Declaration
public TResponse Delete<TResponse>(object request)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.Object | request |
Type Parameters
Delete<TResponse>(String)
Declaration
public TResponse Delete<TResponse>(string relativeOrAbsoluteUrl)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
Type Parameters
Post(IReturnVoid)
Declaration
public void Post(IReturnVoid requestDto)
Parameters
Post<TResponse>(IReturn<TResponse>)
Declaration
public TResponse Post<TResponse>(IReturn<TResponse> request)
Returns
<TResponse>
Parameters
Type Parameters
Post<TResponse>(Object)
Declaration
public TResponse Post<TResponse>(object request)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.Object | request |
Type Parameters
Post<TResponse>(String, Object)
Declaration
public TResponse Post<TResponse>(string relativeOrAbsoluteUrl, object request)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
Type Parameters
Put(IReturnVoid)
Declaration
public void Put(IReturnVoid requestDto)
Parameters
Put<TResponse>(IReturn<TResponse>)
Declaration
public TResponse Put<TResponse>(IReturn<TResponse> request)
Returns
<TResponse>
Parameters
Type Parameters
Put<TResponse>(Object)
Declaration
public TResponse Put<TResponse>(object request)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.Object | request |
Type Parameters
Put<TResponse>(String, Object)
Declaration
public TResponse Put<TResponse>(string relativeOrAbsoluteUrl, object request)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
Type Parameters
Patch(IReturnVoid)
Declaration
public void Patch(IReturnVoid request)
Parameters
Patch<TResponse>(IReturn<TResponse>)
Declaration
public TResponse Patch<TResponse>(IReturn<TResponse> request)
Returns
<TResponse>
Parameters
Type Parameters
Patch<TResponse>(Object)
Declaration
public TResponse Patch<TResponse>(object request)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.Object | request |
Type Parameters
Patch<TResponse>(String, Object)
Declaration
public TResponse Patch<TResponse>(string relativeOrAbsoluteUrl, object request)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
Type Parameters
CustomMethod(String, IReturnVoid)
Declaration
public void CustomMethod(string httpVerb, IReturnVoid request)
Parameters
CustomMethod<TResponse>(String, IReturn<TResponse>)
Declaration
public TResponse CustomMethod<TResponse>(string httpVerb, IReturn<TResponse> request)
Returns
<TResponse>
Parameters
Type Parameters
CustomMethod<TResponse>(String, Object)
Declaration
public TResponse CustomMethod<TResponse>(string httpVerb, object request)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.String | httpVerb |
System.Object | request |
Type Parameters
GetHttpMethod(Object)
Declaration
public string GetHttpMethod(object request)
Returns
System.String
Parameters
Type | Name |
---|
System.Object | request |
PostFileAsync<TResponse>(String, Stream, String, String, String, CancellationToken)
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
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.IO.Stream | fileToUpload |
System.String | fileName |
System.String | mimeType |
System.String | fieldName |
System.Threading.CancellationToken | token |
Type Parameters
PostFile<TResponse>(String, Stream, String, String, String)
Declaration
public TResponse PostFile<TResponse>(string relativeOrAbsoluteUrl, Stream fileToUpload, string fileName, string mimeType, string fieldName = "file")
Returns
<TResponse>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.IO.Stream | fileToUpload |
System.String | fileName |
System.String | mimeType |
System.String | fieldName |
Type Parameters
PostFileWithRequestAsync<TResponse>(Stream, String, Object, String, CancellationToken)
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
Type | Name |
---|
System.IO.Stream | fileToUpload |
System.String | fileName |
System.Object | request |
System.String | fieldName |
System.Threading.CancellationToken | token |
Type Parameters
PostFileWithRequest<TResponse>(Stream, String, Object, String)
Declaration
public TResponse PostFileWithRequest<TResponse>(Stream fileToUpload, string fileName, object request, string fieldName = "file")
Returns
<TResponse>
Parameters
Type | Name |
---|
System.IO.Stream | fileToUpload |
System.String | fileName |
System.Object | request |
System.String | fieldName |
Type Parameters
PostFileWithRequestAsync<TResponse>(String, Stream, String, Object, String, CancellationToken)
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
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.IO.Stream | fileToUpload |
System.String | fileName |
System.Object | request |
System.String | fieldName |
System.Threading.CancellationToken | token |
Type Parameters
PostFileWithRequest<TResponse>(String, Stream, String, Object, String)
Declaration
public TResponse PostFileWithRequest<TResponse>(string relativeOrAbsoluteUrl, Stream fileToUpload, string fileName, object request, string fieldName = "file")
Returns
<TResponse>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.IO.Stream | fileToUpload |
System.String | fileName |
System.Object | request |
System.String | fieldName |
Type Parameters
PostFilesWithRequest<TResponse>(Object, IEnumerable<UploadFile>)
Declaration
public TResponse PostFilesWithRequest<TResponse>(object request, IEnumerable<UploadFile> files)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.Object | request |
System.Collections.Generic.IEnumerable<ServiceStack.UploadFile> | files |
Type Parameters
PostFilesWithRequest<TResponse>(String, Object, IEnumerable<UploadFile>)
Declaration
public TResponse PostFilesWithRequest<TResponse>(string relativeOrAbsoluteUrl, object request, IEnumerable<UploadFile> files)
Returns
<TResponse>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
System.Collections.Generic.IEnumerable<ServiceStack.UploadFile> | files |
Type Parameters
PostFilesWithRequestAsync<TResponse>(Object, IEnumerable<UploadFile>, CancellationToken)
Declaration
public Task<TResponse> PostFilesWithRequestAsync<TResponse>(object request, IEnumerable<UploadFile> files, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.Object | request |
System.Collections.Generic.IEnumerable<ServiceStack.UploadFile> | files |
System.Threading.CancellationToken | token |
Type Parameters
PostFilesWithRequestAsync<TResponse>(String, Object, IEnumerable<UploadFile>, CancellationToken)
Declaration
public Task<TResponse> PostFilesWithRequestAsync<TResponse>(string relativeOrAbsoluteUrl, object request, IEnumerable<UploadFile> files, CancellationToken token = default(CancellationToken))
Returns
System.Threading.Tasks.Task<<TResponse>>
Parameters
Type | Name |
---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
System.Collections.Generic.IEnumerable<ServiceStack.UploadFile> | files |
System.Threading.CancellationToken | token |
Type Parameters
PostFilesWithRequestAsync<TResponse>(String, Object, UploadFile[], CancellationToken)
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
Type | Name |
---|
System.String | requestUri |
System.Object | request |
ServiceStack.UploadFile[] | files |
System.Threading.CancellationToken | token |
Type Parameters
CancelAsync()
Declaration
public void CancelAsync()
Dispose()
Implements