File tree 8 files changed +18
-18
lines changed
8 files changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -13,14 +13,14 @@ Getting Started
13
13
Usage
14
14
-----
15
15
16
- * [ Data formats ] ( usage-data-formats.md )
16
+ * [ Data Formats ] ( usage-data-formats.md )
17
17
* [ Transports] ( usage-transports.md )
18
- * [ Request options ] ( usage-request-options.md )
19
- * [ Multi-part content ] ( usage-multi-part-content.md )
20
- * [ Batch request sending ] ( usage-batch-request-sending.md )
18
+ * [ Request Options ] ( usage-request-options.md )
19
+ * [ Multi-part Content ] ( usage-multi-part-content.md )
20
+ * [ Batch Request Sending ] ( usage-batch-request-sending.md )
21
21
* [ Events] ( usage-events.md )
22
- * [ Logging and profiling ] ( usage-logging.md )
23
- * [ Setup Client instance ] ( usage-setup-client-instance.md )
22
+ * [ Logging and Profiling ] ( usage-logging.md )
23
+ * [ Setup Client Instance ] ( usage-setup-client-instance.md )
24
24
25
25
Additional topics
26
26
-----------------
Original file line number Diff line number Diff line change 1
1
Installation
2
2
============
3
3
4
- ## Installing an extension
4
+ ## Installing the extension
5
5
6
6
In order to install extension use Composer. Either run
7
7
Original file line number Diff line number Diff line change 1
1
Using the HTTP Client DebugPanel
2
2
================================
3
3
4
- The yii2 HTTP Client extension provides a debug panel that can be integrated with the yii debug module
4
+ The Yii 2 HTTP Client extension provides a debug panel that can be integrated with the Yii 2 Debug Module
5
5
and shows the executed HTTP requests.
6
6
7
- Add the following to you application config to enable it (if you already have the debug module
7
+ Add the following to you application config to enable it (if you already have the Debug Module
8
8
enabled, it is sufficient to just add the panels configuration):
9
9
10
10
``` php
Original file line number Diff line number Diff line change 1
- Batch request sending
1
+ Batch Request Sending
2
2
=====================
3
3
4
4
HTTP Client allows sending multiple requests at once using [[ \yii\httpclient\Client::batchSend()]] method:
@@ -23,7 +23,7 @@ which saves the program execution time.
23
23
benefit. By default transport just sends them one by one without any error or warning thrown. Make sure you have
24
24
configured correct transport for the client, if you wish to achieve performance boost.
25
25
26
- ` batchSend() ` method returns the array of the responses, which keys correspond the ones from array of requests.
26
+ ` batchSend() ` method returns the array of the responses, which keys correspond to the ones from array of requests.
27
27
This allows you to process particular request response in easy way:
28
28
29
29
``` php
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Following formats are supported by default:
11
11
- [[ \yii\httpclient\Client::FORMAT_RAW_URLENCODED]] - urlencoded by PHP_QUERY_RFC3986 query string
12
12
- [[ \yii\httpclient\Client::FORMAT_XML]] - XML format
13
13
14
- Each format is covered by 2 entities: 'formatter' and 'parser'. Formatter determines the way content of the
14
+ Each format is covered by two entities: 'formatter' and 'parser'. Formatter determines the way content of the
15
15
request should be composed from data. Parser determines how raw response content should be parsed into data.
16
16
17
17
[[ \yii\httpclient\Client]] automatically chooses corresponding formatter and parser for all format mentioned above.
@@ -50,9 +50,9 @@ class FormatterIni implements FormatterInterface
50
50
{
51
51
public function format(Request $request)
52
52
{
53
- $request->getHeaders()->set('Content-Type', 'text/ini ; charset=UTF-8');
53
+ $request->getHeaders()->set('Content-Type', 'text/ini; charset=UTF-8');
54
54
55
- $pairs = []
55
+ $pairs = [];
56
56
foreach ($request->data as $name => $value) {
57
57
$pairs[] = "$name=$value";
58
58
}
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ return [
27
27
28
28
You may also use [ HTTP client DebugPanel] ( topics-debug.md ) to see all related logs.
29
29
30
- > Attention: since content of the some HTTP requests may be very long, saving it in full inside the logs
31
- may lead to certain problems. Thus there is a restriction on the maximum length of the request content,
30
+ > Attention: since the content of some HTTP requests may be very long, saving it in full inside the logs
31
+ may lead to certain problems. Thus there is the restriction on the maximum length of the request content,
32
32
which will be placed in log. It is controlled by [[ \yii\httpclient\Client::contentLoggingMaxSize]] .
33
33
Any exceeding content will be trimmed before logging.
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ $response = $client->createRequest()
37
37
38
38
You may as well pass options, which are specific for particular request transport. Usually it comes to this
39
39
in case of using [[ \yii\httpclient\CurlTransport]] . For example: you may want to specify separated timeout
40
- for connection and receiving data, which supported by PHP cURL library. You can do this in following way:
40
+ for connection and receiving data, which is supported by PHP cURL library. You can do this in following way:
41
41
42
42
``` php
43
43
use yii\httpclient\Client;
Original file line number Diff line number Diff line change 1
- Setup Client instance
1
+ Setup Client Instance
2
2
=====================
3
3
4
4
Using of this extension starts from instantiating [[ \yii\httpclient\Client]] object. There are several ways
You can’t perform that action at this time.
0 commit comments