Свойство | Тип | Описание | |
---|---|---|---|
CombineUriParts | string | ||
GetContentType | string | ||
GetRequestBody | string | ||
Transform | void |
Метод | Описание | |
---|---|---|
AddFileParameter ( string key, System.Stream fileStream, string filename ) : void |
|
|
AddHeader ( string key, object value ) : void |
Adds an Header to only this specific request. Use this if you have an authentication token that times out on a regular basis. |
|
AddParameter ( object value ) : void |
Adds an unnamed parameter to the body of the request. Use this method if you're not using UrlFormEncoded requests. |
|
AddParameter ( string key, object value, ParameterEncoding encoding = ParameterEncoding.UriEncoded ) : void |
Adds a parameter to the body of the request, to be encoded with the specified format. Note: If the ContentType is anything other than UrlFormEncoded, only the first Parameter will be serialzed to the request body. |
|
AddQueryString ( string key, object value ) : void |
Appends a key/value pair to the end of the existing QueryString in a URI.
|
|
AddQueryString ( string key, string value ) : void |
Appends a key/value pair to the end of the existing QueryString in a URI.
|
|
AddUrlSegment ( string key, string value ) : void |
Replaces tokenized segments of the URL with a desired value.
|
|
GetResourceUri ( string baseUrl ) : |
|
|
RestRequest ( ) : System |
Creates a new RestRequest instance, assuming the request will be an HTTP GET.
|
|
RestRequest ( string resource ) : System |
Creates a new RestRequest instance for a given Resource.
|
|
RestRequest ( string resource, ContentTypes contentType ) : System |
Creates a new RestRequest instance for a given Resource and Method, specifying whether or not to ignore the root object in the response.
|
|
RestRequest ( string resource, HttpMethod method ) : System |
Creates a new RestRequest instance for a given Resource and Method.
|
|
RestRequest ( string resource, HttpMethod method, ContentTypes contentType ) : System |
Creates a new RestRequest instance for a given Resource and Method, specifying whether or not to ignore the root object in the response.
|
|
RestRequest ( string resource, HttpMethod method, bool ignoreRoot ) : System |
Creates a new RestRequest instance for a given Resource and Method, specifying whether or not to ignore the root object in the response.
|
Метод | Описание | |
---|---|---|
CombineUriParts ( ) : string |
Combines URI parts, taking care of trailing and starting slashes. See http://stackoverflow.com/a/6704287
|
|
GetContentType ( ) : string |
|
|
GetRequestBody ( ) : string |
|
|
Transform ( XNode node, |
Technique from http://blogs.msdn.com/b/ericwhite/archive/2009/07/20/a-tutorial-in-the-recursive-approach-to-pure-functional-transformations-of-xml.aspx |
public AddFileParameter ( string key, System.Stream fileStream, string filename ) : void | ||
key | string | |
fileStream | System.Stream | |
filename | string | |
Результат | void |
public AddHeader ( string key, object value ) : void | ||
key | string | |
value | object | |
Результат | void |
public AddParameter ( object value ) : void | ||
value | object | |
Результат | void |
public AddParameter ( string key, object value, ParameterEncoding encoding = ParameterEncoding.UriEncoded ) : void | ||
key | string | |
value | object | /// For ByteArrays or Base64, this needs to be a Stream, or an exception will be thrown when the request is executed. /// |
encoding | ParameterEncoding | |
Результат | void |
public AddQueryString ( string key, object value ) : void | ||
key | string | The string key to append to the QueryString. |
value | object | The value to append to the QueryString (we will call .ToString() for you). |
Результат | void |
public AddQueryString ( string key, string value ) : void | ||
key | string | The string key to append to the QueryString. |
value | string | The string value to append to the QueryString. |
Результат | void |
public AddUrlSegment ( string key, string value ) : void | ||
key | string | |
value | string | |
Результат | void |
public GetResourceUri ( string baseUrl ) : |
||
baseUrl | string | |
Результат |
public RestRequest ( string resource ) : System | ||
resource | string | The specific resource to access. |
Результат | System |
public RestRequest ( string resource, ContentTypes contentType ) : System | ||
resource | string | The URL format string of the resource to request. |
contentType | ContentTypes | The |
Результат | System |
public RestRequest ( string resource, HttpMethod method ) : System | ||
resource | string | The specific resource to access. |
method | HttpMethod | The HTTP method to use for the request. |
Результат | System |
public RestRequest ( string resource, HttpMethod method, ContentTypes contentType ) : System | ||
resource | string | The URL format string of the resource to request. |
method | HttpMethod | The |
contentType | ContentTypes | The |
Результат | System |
public RestRequest ( string resource, HttpMethod method, bool ignoreRoot ) : System | ||
resource | string | The URL format string of the resource to request. |
method | HttpMethod | The |
ignoreRoot | bool | Whether or not the root object from the response should be ignored. |
Результат | System |