MultipartFormDataStreamProvider.GetStream Method

Gets the streaming instance where the message body part is written.

Namespace:  System.Net.Http
Assembly:  System.Net.Http.Formatting (in System.Net.Http.Formatting.dll)

public override Stream GetStream(
	HttpContent parent,
	HttpContentHeaders headers
)

Parameters

parent
Type: HttpContent
The HTTP content that contains this body part.
headers
Type: HttpContentHeaders
Header fields describing the body part.

Return Value

Type: System.IO.Stream
The Stream instance where the message body part is written.

The MultipartFormDataStreamProvider examines the headers provided by the MIME multipart parser, and decides whether to return a file stream or a memory stream for the body part.

Show: