protected function _buildHeaders(Request $request, $options)
    {
        $headers = [];
        foreach ($request->getHeaders() as $name => $values) {
            $headers[] = sprintf('%s: %s', $name, implode(', ', $values));
        }
        $this->_contextOptions['header'] = implode("\r\n", $headers);
    }
protected function _buildHeaders(Request $request, $options)
    {
        $headers = [];
        foreach ($request->getHeaders() as $name => $values) {
            $headers[] = sprintf('%s: %s', $name, implode(', ', $values));
        }
        $this->_contextOptions['header'] = implode("\r\n", $headers);
    }
protected function _buildHeaders ( Request $ request , $ options ) { $ headers = [ ] ; foreach ( $ request -> getHeaders ( ) as $ name => $ values ) { $ headers [ ] = sprintf ( '%s: %s' , $ name , implode ( ', ' , $ values ) ) ; } $ this -> _contextOptions [ 'header' ] = implode ( "\r\n" , $ headers ) ; }
Build the header context for the request.

Creates cookies & headers.

@param \Cake\Http\Client\Request $request The request being sent.
@param array $options Array of options to use.
@return void
Build the header context for the request .