| @@ 39-49 (lines=11) @@ | ||
| 36 | * |
|
| 37 | * @return ResponseInterface |
|
| 38 | */ |
|
| 39 | protected function get( |
|
| 40 | $uri, |
|
| 41 | array $query = [], |
|
| 42 | array $headers = [], |
|
| 43 | array $cookies = [] |
|
| 44 | ): ResponseInterface |
|
| 45 | { |
|
| 46 | return $this->app->http->perform( |
|
| 47 | $this->createRequest($uri, 'GET', $query, $headers, $cookies) |
|
| 48 | ); |
|
| 49 | } |
|
| 50 | ||
| 51 | /** |
|
| 52 | * Execute POST query. |
|
| @@ 61-71 (lines=11) @@ | ||
| 58 | * |
|
| 59 | * @return ResponseInterface |
|
| 60 | */ |
|
| 61 | protected function post( |
|
| 62 | $uri, |
|
| 63 | array $data = [], |
|
| 64 | array $headers = [], |
|
| 65 | array $cookies = [] |
|
| 66 | ): ResponseInterface |
|
| 67 | { |
|
| 68 | return $this->app->http->perform( |
|
| 69 | $this->createRequest($uri, 'POST', [], $headers, $cookies)->withParsedBody($data) |
|
| 70 | ); |
|
| 71 | } |
|
| 72 | ||
| 73 | /** |
|
| 74 | * @param string|UriInterface $uri |
|