8000 Middlewares · pascalboucher/laravel-chatkit-api Wiki · GitHub
[go: up one dir, main page]

Skip to content
This repository was 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
0