yii2-httpclient
yii2-httpclient copied to clipboard
Yii 2 HTTP client
Enh #204
Adds 3 new header keys to $headerCollection. 1. 'http-status-line': The full status line (ie. 'HTTP/1.1 200 OK') 2. 'http-version': The http version returned from the server (ie. 'HTTP/1.1') 3. 'http-status-code-reason-phrase':...
I have this result from server: ``` Для заданного поискового запроса отсутствуют результаты поиска. ``` $response->data return this array: ``` array(2) { ["@attributes"]=> array(1) { ["version"]=> string(3) "1.0" } ["response"]=>...
### Description I am sending a request to the API. HTTP Client duplicates the response body. As a result, when accessing the "data" property, I get an exception: "Syntax error"....
### What steps will reproduce the problem? Use HTTP client with yii\httpclient\StreamTransport transport and try to open any local file via file:/// scheme ### What's expected? A content of given...
### What steps will reproduce the problem? In bulk request sending, when a request fails, the response cannot be obtained. When one request fails, how do other requests return correctly?...
### What steps will reproduce the problem? Assume possible response headers of these forms. HTTP:/1.1 400 InvalidParamSince HTTP:/1.1 400 MissingParamSince HTTP:/1.1 400 MissingQueryParams HTTP:/1.1 400 NoMatchForQueryParams In your current implementation,...
Curl transport provide transparent content deflating and cookies persistence. Ok, but what about caching feature. For example I use this in my project: ```php
The code: ```php $request = (new Client())->get('http://test.site'); $request->cookies->add(new Cookie(['name' => 'name1', 'value' => 'value1'])); echo $request->toString(); ``` Produce next output: ``` GET http://test.site ``` There is no Cookie header. But...
In StreamTransport::send() ```php public function send($request) { $request->beforeSend(); $request->prepare(); ... ``` Also in Request::beforeSend() ```php public function beforeSend() { $this->client->beforeSend($this); $event = new RequestEvent(); ... ```` We need to handle...
I needed to test my API consumer, and found little to no documentation for `MockTransport`, so here's a first stab at it. Would love some feedback if my overall code...