Hi denveloper,
There are a couple of different options. You could write to the producer_consumer_buffer in chunks. If you data is coming from a file the best thing probably would be to use a file buffer/file_stream. The steps basically consist of calling the factory function on the file_stream class, file_stream<uint8_t>::open_istream(filename). This function is asynchronous and returns a task of an input stream that you can then pass as the body of and http_request using the http_request::set_body(stream) method and set the Content-Type. Then what will happen is the stream will be read from in chunks, 64KB by default but configurable with http_client_config::set_chunksize, and sent out. The BingRequest sample uses a file buffer to save the HTTP response, instead for your case instead you will want to use the file buffer as the request body.
Steve
There are a couple of different options. You could write to the producer_consumer_buffer in chunks. If you data is coming from a file the best thing probably would be to use a file buffer/file_stream. The steps basically consist of calling the factory function on the file_stream class, file_stream<uint8_t>::open_istream(filename). This function is asynchronous and returns a task of an input stream that you can then pass as the body of and http_request using the http_request::set_body(stream) method and set the Content-Type. Then what will happen is the stream will be read from in chunks, 64KB by default but configurable with http_client_config::set_chunksize, and sent out. The BingRequest sample uses a file buffer to save the HTTP response, instead for your case instead you will want to use the file buffer as the request body.
Steve