Baseline: main 23.0+ · Verified: main 26.800.0
| Task | Read |
|---|---|
| GET/POST/JSON/download, PSR-18 requests, multipart, async | rules/requests.md |
Options, global defaults, logging, SSRF, CHTTP replacements |
rules/config-security.md |
| Country/city/time zone by IP | rules/geoip.md |
Invariants
- Only
Bitrix\Main\Web\HttpClient;CHTTPand rawcurl_*/file_get_contents($url)are compat only. - Set
socketTimeoutandstreamTimeoutexplicitly: defaults are 30 s and 60 s. - URLs from users, webhooks or imports:
'privateIp' => false(the defaulttrueallows internal addresses). - Check the status before decoding; legacy calls return
falseon transport errors (getError()), PSR-18 throwsClientException. - Stream large bodies to a file (
download()), don't hold them in memory.