Property | Type | Description | |
---|---|---|---|
CombineUriParts | string | ||
GetContentType | string | ||
GetRequestBody | string | ||
Transform | void |
Method | Description | |
---|---|---|
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.
|
Method | Description | |
---|---|---|
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 | |
return | void |
public AddHeader ( string key, object value ) : void | ||
key | string | |
value | object | |
return | 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 | |
return | 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). |
return | 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. |
return | void |
public AddUrlSegment ( string key, string value ) : void | ||
key | string | |
value | string | |
return | void |
public GetResourceUri ( string baseUrl ) : |
||
baseUrl | string | |
return |
public RestRequest ( string resource ) : System | ||
resource | string | The specific resource to access. |
return | System |
public RestRequest ( string resource, ContentTypes contentType ) : System | ||
resource | string | The URL format string of the resource to request. |
contentType | ContentTypes | The |
return | 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. |
return | 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 |
return | 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. |
return | System |