getRawHeader() public method

Get raw response header
public getRawHeader ( ) : string
return string
示例#1
0
 public function testHeadersAndBody()
 {
     $c = new Curl('http://www.popphp.org/version', array(CURLOPT_HEADER => true, CURLOPT_RETURNTRANSFER => true));
     $c->execute();
     $this->assertEquals('text/plain', $c->getHeader('Content-Type'));
     $this->assertGreaterThan(1, count($c->getHeaders()));
     $this->assertContains('HTTP', $c->getRawHeader());
     $this->assertEquals('1.7.0', $c->getBody());
     $this->assertEquals('200', $c->getCode());
     $this->assertEquals('1.1', $c->getHttpVersion());
     $this->assertEquals('OK', $c->getMessage());
 }