Question
· Jul 20, 2021

Example of ChunkedWriter

I'm thinking to try ChunkedWriter based on the documentation I'm reading to solve an issue but could use some clarification. Anyone that could provide a usage example of this down below?

To send a chunked request, do the following:

  1. Create a subclass of %Net.ChunkedWriterOpens in a new window, which is an abstract stream class that defines an interface for writing data in chunks. In this subclass, implement the OutputStream() method.
  2. In your instance of %Net.HttpRequestOpens in a new window, create an instance of your %Net.ChunkedWriterOpens in a new window subclass and populate it with the request data that you want to send.
  3. Set the EntityBody property of your %Net.HttpRequestOpens in a new window instance equal to this instance of %Net.ChunkedWriterOpens in a new window. When you send the HTTP request (see “Sending the HTTP Request”), it calls the OutputStream() method of the EntityBody property.
Discussion (1)0
Log in or sign up to continue