getHeaders() 공개 메소드

Get all response headers
public getHeaders ( ) : array
리턴 array
예제 #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());
 }