Functions used to create and wrap handlers with handler middleware.
Methods |
public
static
cookies
() :
callable
Middleware that adds cookies to requests. The options array must be set to a CookieJarInterface in order to use
|
public
static
history
(
$container
) :
callable
Middleware that pushes history data to an ArrayAccess container.
|
public
static
httpErrors
(
?
GuzzleHttp\BodySummarizerInterface
$bodySummarizer
=
NULL
) :
callable
Middleware that throws exceptions for 4xx or 5xx responses when the
|
public
static
log
(
Psr\Log\LoggerInterface
$logger
,
$formatter
,
string
$logLevel
=
'info'
) :
callable
Middleware that logs requests, responses, and errors using a message
|
public
static
mapRequest
(
callable
$fn
) :
callable
Middleware that applies a map function to the request before passing to |
public
static
mapResponse
(
callable
$fn
) :
callable
Middleware that applies a map function to the resolved promise's |
public
static
prepareBody
() :
callable
This middleware adds a default content-type if possible, a default |
public
static
redirect
() :
callable
Middleware that handles request redirects.
|
public
static
retry
(
callable
$decider
,
?
callable
$delay
=
NULL
) :
callable
Middleware that retries requests based on the boolean result of If no delay function is provided, a simple implementation of exponential
|
public
static
tap
(
?
callable
$before
=
NULL
,
?
callable
$after
=
NULL
) :
callable
Middleware that invokes a callback before and after sending a request. The provided listener cannot modify or alter the response. It simply
|
Methods |
public
static
cookies
() :
callable
Middleware that adds cookies to requests. The options array must be set to a CookieJarInterface in order to use
|
public
static
history
(
$container
) :
callable
Middleware that pushes history data to an ArrayAccess container.
|
public
static
httpErrors
(
?
GuzzleHttp\BodySummarizerInterface
$bodySummarizer
=
NULL
) :
callable
Middleware that throws exceptions for 4xx or 5xx responses when the
|
public
static
log
(
Psr\Log\LoggerInterface
$logger
,
$formatter
,
string
$logLevel
=
'info'
) :
callable
Middleware that logs requests, responses, and errors using a message
|
public
static
mapRequest
(
callable
$fn
) :
callable
Middleware that applies a map function to the request before passing to |
public
static
mapResponse
(
callable
$fn
) :
callable
Middleware that applies a map function to the resolved promise's |
public
static
prepareBody
() :
callable
This middleware adds a default content-type if possible, a default |
public
static
redirect
() :
callable
Middleware that handles request redirects.
|
public
static
retry
(
callable
$decider
,
?
callable
$delay
=
NULL
) :
callable
Middleware that retries requests based on the boolean result of If no delay function is provided, a simple implementation of exponential
|
public
static
tap
(
?
callable
$before
=
NULL
,
?
callable
$after
=
NULL
) :
callable
Middleware that invokes a callback before and after sending a request. The provided listener cannot modify or alter the response. It simply
|