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
jobUrlRequestJobThe URL request job to write the data to.
streamStreamThe stream to read the data from.
bufferSizeintThe 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
joborstreamisnull.- ArgumentOutOfRangeException
bufferSizeis less than or equal to zero, or greater than MaxValue - 56.