final class HttpTransport (View source)

Low-level HTTP transport over cURL.

Owns the cURL handle lifecycle and exposes a single post() method.

Methods

array
post(string $url, string $data, int $timeout, string $userAgent, array $options = [])

Execute a POST request and return the raw response.

void
close()

Close and reset the cURL handle.

Details

array post(string $url, string $data, int $timeout, string $userAgent, array $options = [])

Execute a POST request and return the raw response.

Parameters

string $url
string $data
int $timeout
string $userAgent
array $options

additional cURL options merged over the defaults

Return Value

array

[rawResponse, errorMessage|null]

void close()

Close and reset the cURL handle.

Return Value

void