RestUtilities.

GetFileParam(string, Stream, string) Method

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.