React
in package
implements
DriverInterface
FinalYes
The default {@see DriverInterface}: a non-blocking {@see Browser} from `react/http`.
Error responses resolve rather than reject, so Http can
read Telegram's {"ok": false, ...} body and map it to a typed exception. The
timeout is generous because long polling holds a connection open for the whole
of its timeout parameter.
Tags
Table of Contents
Interfaces
- DriverInterface
- Executes a single prepared {@see Request} and resolves with the raw {@see ResponseInterface} - success or error status alike. Retries, the `retry_after` hold-off, envelope unwrapping, and exception mapping are {@see Http}'s job, not the driver's.
Properties
- $browser : Browser
Methods
- __construct() : mixed
- runRequest() : PromiseInterface<string|int, ResponseInterface>
Properties
$browser
private
Browser
$browser
Methods
__construct()
public
__construct(LoopInterface $loop[, array<string, mixed> $socketOptions = [] ][, float $timeout = 120.0 ]) : mixed
Parameters
- $loop : LoopInterface
- $socketOptions : array<string, mixed> = []
-
Passed to
React\Socket\Connector(e.g. atls.cafileon Windows). - $timeout : float = 120.0
runRequest()
public
runRequest(Request $request) : PromiseInterface<string|int, ResponseInterface>
Parameters
- $request : Request