Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Middlewares

Pascal Boucher edited this page Jun 11, 2018 · 1 revision

Add custom Middlewares

This is an optional feature

You can add an array of middlewares to the Guzzle Handler Stack. Here is an example for logging a request:

Chatkit::setMiddlewares([
    \GuzzleHttp\Middleware::log(
        Log::getMonolog(),
        new \GuzzleHttp\MessageFormatter('{method} {uri} HTTP/{version} {req_body}')
    )
]);
Clone this wiki locally