Skip to main content

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
TypeName
System.Stringname
System.Stringvalue

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
TypeName
System.Stringname
System.Stringvalue
System.Nullable<System.TimeSpan>expiresIn

Get<TResponse>(String)

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

<TResponse>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
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
TypeName
ServiceStack.IReturn<T>queryDto
Type Parameters
  • TResponse

Delete<TResponse>(String)

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

<TResponse>

Parameters
TypeName
System.StringrelativeOrAbsoluteUrl
Type Parameters
  • TResponse

Post<TResponse>(String, Object)

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

<TResponse>

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

Put<TResponse>(String, Object)

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

<TResponse>

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

Patch<TResponse>(String, Object)

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

<TResponse>

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

Send<TResponse>(String, String, Object)

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

<TResponse>

Parameters
TypeName
System.StringhttpMethod
System.StringrelativeOrAbsoluteUrl
System.Objectrequest
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
TypeName
System.StringrelativeOrAbsoluteUrl
System.IO.StreamfileToUpload
System.StringfileName
System.StringmimeType
System.StringfieldName
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
TypeName
System.IO.StreamfileToUpload
System.StringfileName
System.Objectrequest
System.StringfieldName
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
TypeName
System.StringrelativeOrAbsoluteUrl
System.IO.StreamfileToUpload
System.StringfileName
System.Objectrequest
System.StringfieldName
Type Parameters
  • TResponse

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

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