AsyncServiceClient
Assembly: ServiceStack.Client.dll
View Source
public class AsyncServiceClient : IHasSessionId, IHasBearerToken, IHasVersion
Properties
GlobalRequestFilter
The request filter is called before any request. This request filter is executed globally.
View Source
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
public static Action<HttpWebResponse> GlobalResponseFilter { get; set; }
OnAuthenticationRequired
Called before request resend, when the initial request required authentication
View Source
public Action OnAuthenticationRequired { get; set; }
RefreshToken
View Source
public string RefreshToken { get; set; }
RefreshTokenUri
View Source
public string RefreshTokenUri { get; set; }
EnableAutoRefreshToken
View Source
public bool EnableAutoRefreshToken { get; set; }
Credentials
View Source
public ICredentials Credentials { get; set; }
AlwaysSendBasicAuthHeader
View Source
public bool AlwaysSendBasicAuthHeader { get; set; }
StoreCookies
View Source
public bool StoreCookies { get; set; }
Headers
View Source
public NameValueCollection Headers { get; set; }
CookieContainer
View Source
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
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
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
public ResultsFilterDelegate ResultsFilter { get; set; }
ResultsFilterResponse
The ResultsFilterResponse is called before returning the response allowing responses to be cached.
View Source
public ResultsFilterResponseDelegate ResultsFilterResponse { get; set; }
ExceptionFilter
Called with requestUri, ResponseType when server returns 304 NotModified
View Source
public ExceptionFilterDelegate ExceptionFilter { get; set; }
BaseUri
View Source
public string BaseUri { get; set; }
DisableAutoCompression
View Source
public bool DisableAutoCompression { get; set; }
RequestCompressionType
View Source
public string RequestCompressionType { get; set; }
UserName
View Source
public string UserName { get; set; }
Password
View Source
public string Password { get; set; }
Timeout
View Source
public TimeSpan? Timeout { get; set; }
ContentType
View Source
public string ContentType { get; set; }
StreamSerializer
View Source
public StreamSerializerDelegate StreamSerializer { get; set; }
StreamDeserializer
View Source
public StreamDeserializerDelegate StreamDeserializer { get; set; }
UserAgent
View Source
public string UserAgent { get; set; }
EmulateHttpViaPost
View Source
public bool EmulateHttpViaPost { get; set; }
OnDownloadProgress
View Source
public ProgressDelegate OnDownloadProgress { get; set; }
OnUploadProgress
View Source
public ProgressDelegate OnUploadProgress { get; set; }
ShareCookiesWithBrowser
View Source
public bool ShareCookiesWithBrowser { get; set; }
Proxy
View Source
public IWebProxy Proxy { get; set; }
Version
View Source
public int Version { get; set; }
SessionId
View Source
public string SessionId { get; set; }
BearerToken
View Source
public string BearerToken { get; set; }
HttpLog
View Source
public StringBuilder HttpLog { get; set; }
HttpLogFilter
View Source
public Action<StringBuilder> HttpLogFilter { get; set; }
DisableTimer
View Source
public static bool DisableTimer { get; set; }
Fields
BufferSize
View Source
public static int BufferSize
Methods
SetCredentials(String, String)
View Source
public void SetCredentials(string userName, string password)
Parameters
Type | Name |
---|---|
System.String | userName |
System.String | password |
GetCookieValues()
View Source
public Dictionary<string, string> GetCookieValues()
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
SendAsync<TResponse>(String, String, Object, CancellationToken)
View Source
public 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
TResponse
Dispose()
View Source
public void Dispose()