HttpRequest.gzipBody

Set to true to gzip the request body when sending to the server. This is often not supported, and thus turned off by default.

More...
class HttpRequest
void
gzipBody
(
bool want
)

Detailed Description

If a server doesn't support this, you MAY get an http error or it might just do the wrong thing. By spec, it is supposed to be code "415 Unsupported Media Type", but there's no guarantee they will do that correctly since many servers will simply have never considered this possibility. Request compression is quite rare, so before using this, ensure your server supports it by checking its documentation or asking its administrator. (Or running a test, but remember, it might just do the wrong thing and not issue an appropriate error, or the config may change in the future.)

Meta

History

Added August 6, 2024 (dub v11.5)