Documentation

HTTPOptions extends SettingsContainerAbstract
in package
uses HTTPOptionsTrait

Table of Contents

Properties

$ca_info  : string|null
CA Root Certificates for use with CURL/SSL
$curl_check_doh_OCSP  : bool
When set to true, cURL validates that the DoH server staples an OCSP response during the TLS handshake.
$curl_check_OCSP  : bool
cURL extra hardening
$curl_multi_options  : array<int, mixed>
options for the curl multi instance
$curl_options  : array<int, mixed>
options for each curl instance
$dns_over_https  : string|null
Sets a DNS-over-HTTPS provider URL
$retries  : int
Number of retries (multi fetch)
$sleep  : int
sleep timer (microseconds) between each fired multi request on startup
$ssl_doh_verifypeer  : bool
requires either HTTPOptions::$ca_info or a properly working system CA file
$ssl_verifypeer  : bool
requires either HTTPOptions::$ca_info or a properly working system CA file
$timeout  : int
Timeout value
$user_agent  : string
A custom user agent string
$window_size  : int
maximum of concurrent requests for curl_multi

Properties

$ca_info

CA Root Certificates for use with CURL/SSL

public string|null $ca_info = null

(if not configured in php.ini or available in a default path via the ca-certificates package)

Plese note: if you also set CURLOPT_CAINFO or CURLOPT_CAPATH in the $curl_options array, these will take precedence and overwrite the value here.

Tags
see
https://curl.se/docs/caextract.html
https://curl.se/ca/cacert.pem
https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt

$curl_check_doh_OCSP

When set to true, cURL validates that the DoH server staples an OCSP response during the TLS handshake.

public bool $curl_check_doh_OCSP = false
Tags
see
CURLOPT_DOH_SSL_VERIFYSTATUS

$curl_check_OCSP

cURL extra hardening

public bool $curl_check_OCSP = false

When set to true, cURL validates that the server staples an OCSP response during the TLS handshake.

Use with caution as cURL will refuse a connection if it doesn't receive a valid OCSP response - this does not necessarily mean that the TLS connection is insecure.

Tags
see
CURLOPT_SSL_VERIFYSTATUS

$curl_options

options for each curl instance

public array<int, mixed> $curl_options = []

this array is being merged into the default options as the last thing before curl_exec(). none of the values (except existence of the CA file) will be checked - that's up to the implementation.

Hooks
public set

$sleep

sleep timer (microseconds) between each fired multi request on startup

public int $sleep = 0

$timeout

Timeout value

public int $timeout = 10
Tags
see
CURLOPT_TIMEOUT

$user_agent

A custom user agent string

public string $user_agent = 'chillerlanHttpInterface/6.0 +https://github.com/chillerlan/php-httpinterface'
Hooks
public set
Tags
throws
ClientException

$window_size

maximum of concurrent requests for curl_multi

public int $window_size = 5
On this page

Search results