Example #1
0
 public function testCtorPost()
 {
     $uri = Uri::createFromString('https://api.example.com/v1/help');
     $request = Request::post($uri);
     $this->assertEquals(IRequest::METHOD_POST, $request->getMethod());
     $this->assertEquals($uri->__toString(), $request->getUri()->__toString());
 }
Example #2
0
 public function __construct(array $env, array $query_params, array $parsed_body, array $cookies, array $uploaded_files, IUri $uri, $method = IRequest::METHOD_GET, $target = '', array $headers = [], $body = '', $version = IMessage::HTTP_VERSION_10)
 {
     parent::__construct($uri, $method, $target, $headers, $body, $version);
     $this->env = $env;
     $this->query_params = $query_params;
     $this->parsed_body = $parsed_body;
     $this->cookies = $cookies;
     $this->uploaded_files = $uploaded_files;
 }