PendingRequest
class PendingRequest mixin PendingRequest
Traits
Properties
| protected TResource> | $resource | ||
| protected bool | $enableMiddleware | ||
| protected array | $middlewareOptions | ||
| protected array | $guzzleOptions | ||
| protected array<callable|object|string> | $requestMiddleware | ||
| protected array<callable|object|string> | $responseMiddleware | ||
| protected PendingRequest|null | $request | ||
| protected Pipeline | $pipeline |
Methods
Apply the callback if the given "value" is (or resolves to) truthy.
Apply the callback if the given "value" is (or resolves to) falsy.
Enable or disable middleware for the request.
Disable middleware for the request.
Set the options for the middleware.
Set the Guzzle options for the request.
Set the request middleware for the request.
Add request middleware to the existing request middleware.
Set the response middleware for the request.
Add response middleware to the existing response middleware.
Set the resource class for the request.
Issue a GET request to the given URL.
Issue a HEAD request to the given URL.
Issue a PATCH request to the given URL.
Issue a PUT request to the given URL.
Issue a DELETE request to the given URL.
Send the request to the given URL.
Provide a dynamic method to pass calls to the pending request.
No description
No description
No description
Details
in
Conditionable at line 23
mixed
when(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) truthy.
in
Conditionable at line 56
mixed
unless(mixed $value = null, callable|null $callback = null, callable|null $default = null)
Apply the callback if the given "value" is (or resolves to) falsy.
at line 66
PendingRequest
enableMiddleware()
Enable or disable middleware for the request.
at line 76
PendingRequest
disableMiddleware()
Disable middleware for the request.
at line 86
PendingRequest
withMiddlewareOptions(array $options)
Set the options for the middleware.
at line 96
PendingRequest
withGuzzleOptions(array $options)
Set the Guzzle options for the request.
at line 106
PendingRequest
withRequestMiddleware(array $middleware)
Set the request middleware for the request.
at line 116
PendingRequest
withAddedRequestMiddleware(array $middleware)
Add request middleware to the existing request middleware.
at line 126
PendingRequest
withResponseMiddleware(array $middleware)
Set the response middleware for the request.
at line 136
PendingRequest
withAddedResponseMiddleware(array $middleware)
Add response middleware to the existing response middleware.
at line 149
PendingRequest
withResource(string $resource)
Set the resource class for the request.
at line 174
ApiResource
get(string $url, array|JsonSerializable|string|null $query = null)
Issue a GET request to the given URL.
at line 185
ApiResource
head(string $url, array|string|null $query = null)
Issue a HEAD request to the given URL.
at line 196
ApiResource
post(string $url, array|JsonSerializable $data = [])
Issue a POST request to the given URL.
at line 207
ApiResource
patch(string $url, array $data = [])
Issue a PATCH request to the given URL.
at line 218
ApiResource
put(string $url, array $data = [])
Issue a PUT request to the given URL.
at line 229
ApiResource
delete(string $url, array $data = [])
Issue a DELETE request to the given URL.
at line 240
ApiResource
send(string $method, string $url, array $options = [])
Send the request to the given URL.
at line 248
PendingRequest
__call(string $method, array $parameters)
Provide a dynamic method to pass calls to the pending request.
at line 256
protected ApiResource
sendRequest()
No description
at line 284
protected ApiRequest
handleMiddlewareRequest(ApiRequest $request)
No description
at line 292
protected ApiResponse
handleMiddlewareResponse(ApiResponse $response)
No description
at line 300
protected array
createMiddleware(array $middlewareClasses)
No description
at line 315
protected PendingRequest
getClient()
No description