Http¶
Include: Use System\Http.pkg
The Http reference covers the cHttpClient class for HTTP requests, headers, proxy settings, certificates, progress and chunk callbacks, and response helpers.
Client¶
- cHttpClient is the HTTP client class used to send requests and read responses.
HTTP client at a glance¶
| Area | APIs |
|---|---|
| Endpoint and proxy setup | psEndpoint, psProxyEndpoint, proxy credentials |
| Headers and accepted content | HttpHeader, HttpHeaders, HttpAccept, HttpAcceptCharset, HttpAcceptLanguage, HttpUserAgent |
| Request methods | HttpGet, HttpPost, HttpPut, HttpDelete, HttpPatch, HttpSend |
| Response helpers | HttpResponseCode, HttpResponseBody, HttpResponseHeaders, HttpResponseToDataType |
| Files and chunks | *ToFile methods, pbChunked, OnChunk |
| Client certificates | ClientCertificate, Security certificate pages |
Reading path¶
- Configure endpoint, proxy, and headers.
- Send a request method.
- Inspect status, body, and headers.
- Use
HttpResponseToDataTypefor JSON. - Use
*ToFilemethods or chunk events for large responses. - Use Security certificate pages for client certificates.
Member groups¶
- Properties configure endpoints, proxy settings, headers, certificates, and callbacks.
- Events handle progress and chunk callbacks.
- Types defines HTTP header data.
- Methods send requests and read response data.