Skip to main content

AsyncServiceClient

Assembly: ServiceStack.Client.dll
View Source
Declaration
public class AsyncServiceClient : IHasSessionId, IHasBearerToken, IHasVersion

Properties

GlobalRequestFilter

The request filter is called before any request. This request filter is executed globally.

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

GlobalResponseFilter

The response action is called once the server response is available. It will allow you to access raw response information. This response action is executed globally. Note that you should NOT consume the response stream as this is handled by ServiceStack

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

OnAuthenticationRequired

Called before request resend, when the initial request required authentication

View Source
Declaration
public Action OnAuthenticationRequired { 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; }

Credentials

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

AlwaysSendBasicAuthHeader

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

StoreCookies

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

Headers

View Source
Declaration
public NameValueCollection Headers { get; set; }

CookieContainer

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

RequestFilter

The request filter is called before any request. This request filter only works with the instance where it was set (not global).

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

ResponseFilter

The response action is called once the server response is available. It will allow you to access raw response information. Note that you should NOT consume the response stream as this is handled by ServiceStack

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

ResultsFilter

The ResultsFilter is called before the Request is sent allowing you to return a cached response.

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

ResultsFilterResponse

The ResultsFilterResponse is called before returning the response allowing responses to be cached.

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

ExceptionFilter

Called with requestUri, ResponseType when server returns 304 NotModified

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

BaseUri

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

DisableAutoCompression

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

RequestCompressionType

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

UserName

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

Password

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

Timeout

View Source
Declaration
public TimeSpan? Timeout { get; set; }

ContentType

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

StreamSerializer

View Source
Declaration
public StreamSerializerDelegate StreamSerializer { get; set; }

StreamDeserializer

View Source
Declaration
public StreamDeserializerDelegate StreamDeserializer { get; set; }

UserAgent

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

EmulateHttpViaPost

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

OnDownloadProgress

View Source
Declaration
public ProgressDelegate OnDownloadProgress { get; set; }

OnUploadProgress

View Source
Declaration
public ProgressDelegate OnUploadProgress { get; set; }

ShareCookiesWithBrowser

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

Proxy

View Source
Declaration
public IWebProxy Proxy { get; set; }

Version

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

SessionId

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

BearerToken

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

HttpLog

View Source
Declaration
public StringBuilder HttpLog { get; set; }

HttpLogFilter

View Source
Declaration
public Action<StringBuilder> HttpLogFilter { get; set; }

DisableTimer

View Source
Declaration
public static bool DisableTimer { get; set; }

Fields

BufferSize

View Source
Declaration
public static int BufferSize

Methods

SetCredentials(String, String)

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

GetCookieValues()

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

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

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

View Source
Declaration
public 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

Dispose()

View Source
Declaration
public void Dispose()

Implements