D7 API documentation
What's New
Modules
Main module in old core
Legacy mode
PSR-18: HTTP Client
Asynchronous queries
CURL
Proxy
Logging
HttpClient constructor
HttpClient destuctor
disableSslVerification
download
get
getCharset
getContentType
getCookies
getEffectiveUrl
getError
getHeaders
getResult
getStatus
head
post
query
setAuthorization
setCharset
setCompress
setCookies
setHeader
setOutputStream
setProxy
setRedirect
setStreamTimeout
setTimeout
setVersion
waitResponse
setCompress
void public \Bitrix\Main\Web\HttpClient::setCompress( boolean $value );
Non-static method sets compression options.
Please, be advised not to use compression options with output stream, when content can be significantly large-scale. When Content-Encoding field header is specified, response will be compressed in any case.
Parameters
Parameter | Description | Version |
---|---|---|
$value | When true, sends Accept-Encoding: gzip. |
Example
© «Bitrix24», 2001-2024
Up