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:
- 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.
- 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.
- 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.