Table of Contents

Method Write

Namespace
DotNetBrowser.Net
Assembly
DotNetBrowser.dll

Write(UrlRequestJob, Stream, int)

Reads all bytes from stream and writes them to the URL request job.

public static void Write(this UrlRequestJob job, Stream stream, int bufferSize = 81920)

Parameters

job UrlRequestJob

The URL request job to write the data to.

stream Stream

The stream to read the data from.

bufferSize int

The size of the buffer used to read the stream. Must be greater than zero.

Remarks

The stream is read in chunks to avoid buffering the entire content in memory. After all data is written, call Complete() or Fail() to finish the request.

Exceptions

ArgumentNullException

job or stream is null.

ArgumentOutOfRangeException

bufferSize is less than or equal to zero, or greater than MaxValue - 56.