getHeaders() публичный Метод

public getHeaders ( ) : HeaderCollection
Результат HeaderCollection
Пример #1
0
 public function testSimpleUsage()
 {
     $headers = array(new Http\HeaderField('Content-Length', 9));
     $request = new Http\Request(Request::METHOD_GET, new Http\Url('http://example.org/test/123?a=b'), $headers, 'test data');
     $this->assertEquals($request->getRequestMethod(), 'GET');
     $this->assertEquals($request->getUrl()->getPath(), '/test/123');
     $this->assertEquals($request->getBody(), 'test data');
     $this->assertEquals($request->getHeaders()->toArray(false), array('Content-Length: 9'));
 }