private function onBefore(RequestInterface $request)
    {
        $headers = $this->createHeaders($request);
        foreach ($headers as $headerKey => $headerValue) {
            $request = $request->withHeader($headerKey, $headerValue);
        }

        return $request;
    }
private function onBefore(RequestInterface $request)
    {
        $headers = $this->createHeaders($request);
        foreach ($headers as $headerKey => $headerValue) {
            $request = $request->withHeader($headerKey, $headerValue);
        }

        return $request;
    }
private function onBefore ( RequestInterface $ request ) { $ headers = $ this -> createHeaders ( $ request ) ; foreach ( $ headers as $ headerKey => $ headerValue ) { $ request = $ request -> withHeader ( $ headerKey , $ headerValue ) ; } return $ request ; }
Before executing the request, add the extra headers

@param RequestInterface $request

@return RequestInterface
Before executing the request add the extra headers