curl / Mailing Lists / curl-library / Single Mail


Re: curl_http_post: How to minimize the data usage

From: Daniel Stenberg <>
Date: Wed, 18 Jan 2017 00:10:32 +0100 (CET)

On Tue, 17 Jan 2017, Kman Devnull wrote:

> I am currently using HTTP_POST with curl on my RPi like device to send data
> to cloud from my IoT sensor. It consumes around 3MB of data on my SIM
> connection.
> Is there anything I could set in my curl/options to minimize the data_usage?
> i.e. something like may be to strip away all the HTTP headers, and to ensure
> only the actual data is sent across ?

If you check how much headers curl sends in a request like that, you'll notice
that the total ammount will be at max a few hundred bytes. If you'd do it over
http2 it could compress the headers, even if it would compress really good
you'd only gain data in the order of hundreds of bytes and you're talking
about a 3MB post here.

Your post is large simply because you're sending large amounts of data.

List admin:
Received on 2017-01-18