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
CURL
CURL (Client URL) – library with open source code used for sending HTTP requests from various programming languages, including C, PHP and others.
Using CURL is available only starting from PHP version 8.0. Current implementation in the client can be viewed as experimental. CURL can give a significant boost of performance due to being a binary code and not the extended handling of sockets on PHP. This is specifically noticeable at the couple implemented asynchronous queries.
Additionally, CURL allows to diagnose specific issues due to having a detailed debugging:
$http = new HttpClient([ 'useCurl' => true, 'curlLogFile' => '/home/bitrix/www/curl.txt', ]);
© «Bitrix24», 2001-2024
Up