class RequestCanceled extends Event

Dispatched when coroutine cancellation stops a received request before its lifecycle, including termination, completes.

The response is set only when its send attempt finished. The exception slot keeps an earlier lifecycle failure, as on the other lifecycle events.

Methods

__construct(Request|null $request, Response|null $response, Throwable $cancellation, Throwable|null $exception = null, string $server = 'http')

Create a new event instance.

Throwable|null
getThrowable()

Get the transport or lifecycle exception, if any.

from  Event

Details

at line 25
__construct(Request|null $request, Response|null $response, Throwable $cancellation, Throwable|null $exception = null, string $server = 'http')

Create a new event instance.

Parameters

Request|null $request
Response|null $response
Throwable $cancellation

the cancellation, or a failure carrying it, that stopped the lifecycle

Throwable|null $exception
string $server

in Event at line 32
Throwable|null getThrowable()

Get the transport or lifecycle exception, if any.

Return Value

Throwable|null