C# Client Library
A C# Client Library for the AnalyzeRe REST API
|
Describes an additional data sub-resource available off a resource. Endpoint supports GET and PUT. More...
Public Member Functions | |
DataSubResource (IEndpoint owner, string relativePath) | |
Defines a new data sub-resource off of some other endpoint. | |
T | Get (IEnumerable< Parameter > parameters=null, int? timeout=null) |
Performs a GET request a at this endpoint. | |
IRestResponse | GetStream (Action< Stream > consumeStream, IEnumerable< Parameter > parameters=null, int? timeout=null) |
Perform a GET on the supplied URL and provide an action for consuming the response stream rather than loading the whole response into memory. | |
IRestResponse | Head (IEnumerable< Parameter > parameters=null, int? timeout=null) |
Performs a HEAD request at this endpoint. | |
Static Public Member Functions | |
static implicit | operator T (SubResource< T > value) |
Allows implicit conversion of an instance of this class to its expected response return type. | |
Protected Attributes | |
string | PUT_ContentType = "application/octet-stream" |
The contentType to set when submitting this resource's body in a PUT request. | |
Properties | |
int? | DefaultTimeout [get, set] |
Can be used to override the API.DefaultRequestTimeout with one that better suits this SubResource. | |
Describes an additional data sub-resource available off a resource. Endpoint supports GET and PUT.
TODO: The PUT method appears to have been deprecated. Can this class be removed?
Definition at line 6 of file DataSubResource.cs.
Defines a new data sub-resource off of some other endpoint.
owner | The endpoint which owns this data sub-resource. |
relativePath | The relative path to the data endpoint from its owner. |
Definition at line 17 of file DataSubResource.cs.
|
inlineinherited |
Performs a GET request a at this endpoint.
parameters | (Optional) Rest parameters to include with the GET request. |
timeout | (Optional) The timeout before the request fails. |
Definition at line 51 of file SubResource[T].cs.
|
inlineinherited |
Perform a GET on the supplied URL and provide an action for consuming the response stream rather than loading the whole response into memory.
Warning: The consumeStream action will always be invoked and handed the response body, even if the response status was an error. Your consumeStream action should be able to handle scenarios where the message body is an error message or otherwise contains unexpected content.
consumeStream | The action that will consume the response stream. |
parameters | Any additional parameters to include in the request. |
timeout | Optional - The desired request response timeout (in milliseconds). |
APIRequestException | If the request failed to reach the API. |
Definition at line 72 of file SubResource[T].cs.
|
inlineinherited |
Performs a HEAD request at this endpoint.
parameters | (Optional) Rest parameters to include with the HEAD request. |
timeout | (Optional) The timeout before the request fails. |
Definition at line 40 of file SubResource[T].cs.
|
inlinestaticinherited |
Allows implicit conversion of an instance of this class to its expected response return type.
Definition at line 28 of file SubResource[T].cs.
The contentType to set when submitting this resource's body in a PUT request.
Definition at line 10 of file DataSubResource.cs.
|
getsetinherited |
Can be used to override the API.DefaultRequestTimeout with one that better suits this SubResource.
Definition at line 16 of file SubResource[T].cs.