Skip to content
docsv0.2.0

CurlTransport

The default transport: cURL, exactly as every provider in this package called it inline before there was a seam. It is the default so that a host wiring a provider with nothing but its client id and secret keeps working unchanged, and this package keeps its empty `require` block — no PSR-18 client to supply, no dependency added.

CurlTransport::post()

public function post(string $url, array $fields, array $headers = []): array

POSTs `$fields` as `application/x-www-form-urlencoded`.

Parameters

Parameters of post()
NameTypeDescription
$urlstring
$fieldsarray<string, string>
$headerslist<string>

CurlTransport::get()

public function get(string $url, array $headers = []): array

GETs `$url`.

Parameters

Parameters of get()
NameTypeDescription
$urlstring
$headerslist<string>