curl / Mailing Lists / curl-library / Single Mail


Multipart POSTs with large bodies

From: Reese Grimsley via curl-library <>
Date: Tue, 11 Apr 2017 17:28:32 -0500


I need to send audio data in the second part of a multi-part POST over
HTTP2, in which the data should be broken into "frames" of 320 bytes each.
I am using the multi API, and have it set so that this connection is
multiplexed with a few others. I am wondering if libcurl by default sends
all data for the entire POST at one time, or if anything is broken up into
smaller packets.

The documentation of the recipient suggests that the audio data is just
going to be a stream encoded binary data, so I am led to believe that I am
not uploading a file, just the set of data. Is this sort of operation
supported by formadd() and HTTPPOST? Otherwise I will need to set up the
POST field, and use the POSTFIELDSIZE_LARGE option, correct? The data to
upload will most likely be in the range of 100kB to 1MB. My main question
is how to send a ensure that a POST message is sent piece by piece.


Received on 2017-04-12