This content is part of a third party extension that is not supported by the Cake project.
For more information about this extension see
Cake.Rest.
Summary
Sends a REST request and receives its response.
Syntax
public static IRestResponse Rest(this ICakeContext context, string method, Uri endpoint, IDictionary<string, string> headers, string contentType, string fileName, Stream bodyStream)
Attributes
| Type |
Description |
| CakeMethodAliasAttribute |
|
| CakeNamespaceImportAttribute |
|
| CakeNamespaceImportAttribute |
|
| CakeNamespaceImportAttribute |
|
Parameters
| Name |
Type |
Description |
| context |
ICakeContext |
Cake build context |
| method |
string |
HTTP method |
| endpoint |
Uri |
Endpoint local address, starting with / |
| headers |
IDictionary<string, string> |
HTTP headers, null for no headers |
| contentType |
string |
MIME type of file included in body, use "application/octet-stream" if unsure. |
| fileName |
string |
Name of the file included in body, only for Content-Disposition header. |
| bodyStream |
Stream |
Stream of request body contents |
Return Value
| Type |
Description |
| IRestResponse |
REST response |