src/AbstractAPI.php
protected function headerMiddleware($headers)
    {
        return function (callable $handler) use ($headers) {
            return function (RequestInterface $request, array $options) use ($handler, $headers) {
                foreach ($headers as $key => $header) {
                    $request = $request->withHeader($key, $header);
                }

                return $handler($request, $options);
            };
        };
    }
protected function headerMiddleware($headers)
    {
        return function (callable $handler) use ($headers) {
            return function (RequestInterface $request, array $options) use ($handler, $headers) {
                foreach ($headers as $key => $header) {
                    $request = $request->withHeader($key, $header);
                }

                return $handler($request, $options);
            };
        };
    }
protected function headerMiddleware ( $ headers ) { return function ( callable $ handler ) use ( $ headers ) { return function ( RequestInterface $ request , array $ options ) use ( $ handler , $ headers ) { foreach ( $ headers as $ key => $ header ) { $ request = $ request -> withHeader ( $ key , $ header ) ; } return $ handler ( $ request , $ options ) ; } ; } ; }
add headers.

@param $headers

@return \Closure
add headers .