original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: 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
docstring_tokens: Build the header context for the request .