MOHAMED
MOHAMED

Reputation: 43528

Is it possible to make libcurl compressing data of the http messages?

I make a search and I found that the libcurl is able to decompress received data (compressed with gzip for example) using the following option:

curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "gzip");

But I can not find how to make the libcurl sending a compressed data of the http messages?

Does the libcurl support compressing data of the http messages that going to be sent? If yes how I can configure that in my http curl client?

Upvotes: 1

Views: 1187

Answers (1)

Daniel Stenberg
Daniel Stenberg

Reputation: 58024

There's no standard way in HTTP to compress the data (and have the server understand that and decompress). You need to manually compress and send it and you must make sure the receiver understands the compression if it should be capable of decompressing it.

Upvotes: 3

Related Questions