private function extractHeadersFromResponse() {
    $response = "";
    $code = $this->response->getStatusCode();
    $text = HttpUtil::getResponseTextForCode($code);
    $response .= sprintf(self::STATUS_LINE_FORMAT, $code, $text);

    foreach($this->response->getHeaderList() as $header) {
      $response .= sprintf("%s: %s%s",
                           $header->getKey(),
                           $header->getValue(),
                           self::CRLF);
    }
    $response .= self::CRLF;
    return $response;
  }
private function extractHeadersFromResponse() {
    $response = "";
    $code = $this->response->getStatusCode();
    $text = HttpUtil::getResponseTextForCode($code);
    $response .= sprintf(self::STATUS_LINE_FORMAT, $code, $text);

    foreach($this->response->getHeaderList() as $header) {
      $response .= sprintf("%s: %s%s",
                           $header->getKey(),
                           $header->getValue(),
                           self::CRLF);
    }
    $response .= self::CRLF;
    return $response;
  }
private function extractHeadersFromResponse ( ) { $ response = "" ; $ code = $ this -> response -> getStatusCode ( ) ; $ text = HttpUtil :: getResponseTextForCode ( $ code ) ; $ response .= sprintf ( self :: STATUS_LINE_FORMAT , $ code , $ text ) ; foreach ( $ this -> response -> getHeaderList ( ) as $ header ) { $ response .= sprintf ( "%s: %s%s" , $ header -> getKey ( ) , $ header -> getValue ( ) , self :: CRLF ) ; } $ response .= self :: CRLF ; return $ response ; }
Create the header body from the URLFetch response.

@returns string The header block of the response.
Create the header body from the URLFetch response .