IRestClient
Assembly: ServiceStack.Interfaces.dll
View Source
Declaration
public interface IRestClient : IRestClientSync, IServiceClientCommon, IDisposable
Methods
AddHeader(String, String)
View Source
Declaration
void AddHeader(string name, string value)
Parameters
Type | Name |
---|---|
System.String | name |
System.String | value |
ClearCookies()
View Source
Declaration
void ClearCookies()
GetCookieValues()
View Source
Declaration
Dictionary<string, string> GetCookieValues()
Returns
System.Collections.Generic.Dictionary<System.String,System.String>
SetCookie(String, String, Nullable<TimeSpan>)
View Source
Declaration
void SetCookie(string name, string value, TimeSpan? expiresIn = null)
Parameters
Type | Name |
---|---|
System.String | name |
System.String | value |
System.Nullable<System.TimeSpan> | expiresIn |
Get<TResponse>(String)
View Source
Declaration
TResponse Get<TResponse>(string relativeOrAbsoluteUrl)
Returns
<TResponse>
Parameters
Type | Name |
---|---|
System.String | relativeOrAbsoluteUrl |
Type Parameters
TResponse
GetLazy<TResponse>(IReturn<QueryResponse<TResponse>>)
View Source
Declaration
IEnumerable<TResponse> GetLazy<TResponse>(IReturn<QueryResponse<TResponse>> queryDto)
Returns
System.Collections.Generic.IEnumerable<<TResponse>>
Parameters
Type | Name |
---|---|
ServiceStack.IReturn<T> | queryDto |
Type Parameters
TResponse
Delete<TResponse>(String)
View Source
Declaration
TResponse Delete<TResponse>(string relativeOrAbsoluteUrl)
Returns
<TResponse>
Parameters
Type | Name |
---|---|
System.String | relativeOrAbsoluteUrl |
Type Parameters
TResponse
Post<TResponse>(String, Object)
View Source
Declaration
TResponse Post<TResponse>(string relativeOrAbsoluteUrl, object request)
Returns
<TResponse>
Parameters
Type | Name |
---|---|
System.String | relativeOrAbsoluteUrl |
System.Object | request |
Type Parameters
TResponse
Put<TResponse>(String, Object)
View Source
Declaration
TResponse Put<TResponse>(string relativeOrAbsoluteUrl, object requestDto)
Returns
<TResponse>
Parameters
Type | Name |
---|---|
System.String | relativeOrAbsoluteUrl |
System.Object | requestDto |
Type Parameters
TResponse
Patch<TResponse>(String, Object)
View Source
Declaration
TResponse Patch<TResponse>(string relativeOrAbsoluteUrl, object requestDto)
Returns
<TResponse>
Parameters
Type | Name |
---|---|
System.String | relativeOrAbsoluteUrl |
System.Object | requestDto |
Type Parameters
TResponse
Send<TResponse>(String, String, Object)
View Source
Declaration
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
TResponse
PostFile<TResponse>(String, Stream, String, String, String)
View Source
Declaration
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
TResponse
PostFileWithRequest<TResponse>(Stream, String, Object, String)
View Source
Declaration
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
TResponse
PostFileWithRequest<TResponse>(String, Stream, String, Object, String)
View Source
Declaration
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
TResponse
PostFilesWithRequest<TResponse>(Object, IEnumerable<UploadFile>)
View Source
Declaration
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
TResponse
PostFilesWithRequest<TResponse>(String, Object, IEnumerable<UploadFile>)
View Source
Declaration
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
TResponse