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
Creates
RestSharp.FileParameter instance for use with AddFile.
- Assembly
- Cake
.Rest .dll - Namespace
- Cake
.Rest - Containing Type
- RestUtilities
Syntax
public static FileParameter GetFileParam(string fileName, Stream bodyStream, string contentType)
Parameters
| Name | Type | Description |
|---|---|---|
| fileName | string | Name of the file included in body, only for Content-Disposition header. |
| bodyStream | Stream | Stream of request body contents |
| contentType | string | MIME type of file included in body, use "application/octet-stream" if unsure. |
Return Value
| Type | Description |
|---|---|
| FileParameter | Instance of RestSharp.FileParameter containing given parameters. |
