thesportsdb-client

CurlTransport
in package
implements Transport

FinalYes

The default transport, on ext-curl.

Table of Contents

Interfaces

Transport
Performs GET requests. Implement it to use another HTTP stack (e.g. a PSR-18 client) or to fake the network in tests. Throw TransportException when no response arrives; return every HTTP status, including 4xx and 5xx, as a Response.

Properties

$timeout  : float

Methods

__construct()  : mixed
get()  : Response

Properties

Methods

__construct()

public __construct([float $timeout = 30.0 ]) : mixed
Parameters
$timeout : float = 30.0

get()

public get(string $url, array<string|int, mixed> $headers) : Response
Parameters
$url : string
$headers : array<string|int, mixed>
Return values
Response
On this page

Search results