API / Minn\Http / Outbound

Outbound final readonly class

Minn\Http\Outbound · public/minn/src/Minn/Http/Outbound.php · 46 lines

One outgoing HTTP request, normalised: the transport needs nothing else.

Uses 1

Constants and properties

propreadonly string $method

Promoted from the constructor.

propreadonly string $url

Promoted from the constructor.

propreadonly array $headers

Promoted from the constructor.

propreadonly ?string $body

Promoted from the constructor.

propreadonly float $timeout

Promoted from the constructor.

propreadonly int $redirects

Promoted from the constructor.

propreadonly bool $verifySsl

Promoted from the constructor.

propreadonly string $userAgent

Promoted from the constructor.

propreadonly ?string $caInfo

Promoted from the constructor.

propreadonly bool $blocking

Promoted from the constructor.

propreadonly ?Closure $prepare

Promoted from the constructor.

propreadonly ?float $connectTimeout

Promoted from the constructor.

propreadonly ?int $maxBytes

Promoted from the constructor.

Public

new__construct(string $method, string $url, array $headers = array ( ), ?string $body = NULL, float $timeout = 5.0, int $redirects = 5, bool $verifySsl = true, string $userAgent = '', ?string $caInfo = NULL, bool $blocking = true, ?Closure $prepare = NULL, ?float $connectTimeout = NULL, ?int $maxBytes = NULL)#
$headerslist<string>"Name: value" lines
$prepare(Closure(\CurlHandle): void)|nulla last word on the curl handle before it is sent
$connectTimeoutfloat|nullseconds to connect, when not the whole timeout
$maxBytesint|nullthe largest body accepted; a longer one fails the exchange
methodto(string $url, string $method, ?string $body, array $headers): self#

The same request sent somewhere else, as the next hop of a redirect.

$headerslist<string>"Name: value" lines
methodpreparing(Closure $prepare): self#

The same request with a last word on the curl handle, run after any it already has.