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
query
boolean public \Bitrix\Main\Web\HttpClient::query( string $method, string $url, array|string|resource $entityBody = null );
Non-static method executes HTTP query.
Parameters
Parameter | Description | Version |
---|---|---|
$method | HTTP method (GET, POST and etc.). Important: must be in uppercase. | |
$url | Absolute URL as follows: "http://user:pass@host:port/path/?query" . | |
$entityBody | POST/PUT query entity. When it is a resource handler, the data is read directly from stream. |
Examples
© «Bitrix24», 2001-2024
Up