DiscordPHP-Http Documentation

Guzzle
in package
implements DriverInterface

guzzlehttp/guzzle driver for Discord HTTP client. (still with React Promise).

Tags
author

SQKo

Table of Contents

Interfaces

DriverInterface
Interface for an HTTP driver.

Properties

$client  : Client
GuzzleHTTP/Guzzle client.
$loop  : LoopInterface|null
ReactPHP event loop.

Methods

__construct()  : mixed
Constructs the Guzzle driver.
runRequest()  : PromiseInterface<string|int, ResponseInterface>
Runs a request.

Properties

$client

GuzzleHTTP/Guzzle client.

protected Client $client

$loop

ReactPHP event loop.

protected LoopInterface|null $loop

Methods

__construct()

Constructs the Guzzle driver.

public __construct([LoopInterface|null $loop = null ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$loop : LoopInterface|null = null
$options : array<string|int, mixed> = []

runRequest()

Runs a request.

public runRequest(Request $request) : PromiseInterface<string|int, ResponseInterface>

Returns a promise resolved with a PSR response interface.

Parameters
$request : Request
Return values
PromiseInterface<string|int, ResponseInterface>
On this page

Search results