You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: integrations/symfony-bundle.rst
+33-36Lines changed: 33 additions & 36 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ This bundle integrate HTTPlug with the Symfony framework. The bundle helps to re
7
7
Installation
8
8
````````````
9
9
10
-
Install the Httplug bundle with composer and enable it in your AppKernel.php.
10
+
Install the HTTPlug bundle with composer and enable it in your AppKernel.php.
11
11
12
12
.. code-block:: bash
13
13
@@ -53,7 +53,7 @@ Web Debug Toolbar
53
53
:align:right
54
54
:width:120px
55
55
56
-
When using a client configured with HttplugBundle, you will get debug information in the web debug toolbar. It will tell you how many request were made and how many of those that were successful or not. It will also show you detailed information about each request.
56
+
When using a client configured with ``HttplugBundle``, you will get debug information in the web debug toolbar. It will tell you how many request were made and how many of those that were successful or not. It will also show you detailed information about each request.
57
57
58
58
Discovery of Factory Classes
59
59
````````````````````````````
@@ -85,11 +85,8 @@ You can configure your clients with default options. These default values will b
85
85
config:
86
86
# These options are given to Guzzle without validation.
87
87
defaults:
88
-
base_uri: 'http://google.se/'
89
88
verify_ssl: false
90
89
timeout: 4
91
-
headers:
92
-
Content-Type: 'application/json'
93
90
acme:
94
91
factory: 'httplug.factory.curl'
95
92
config:
@@ -103,7 +100,7 @@ You can configure your clients with default options. These default values will b
103
100
// will be the same as ``httplug.client.my_guzzle5``
The bundle has client factory services that you can use to build your client. If you need a very custom made client you could create your own factory service implementing ``Http\HttplugBudle\ClientFactory\ClientFactory``. The build in services are:
103
+
The bundle has client factory services that you can use to build your client. If you need a very custom made client you could create your own factory service implementing ``Http\HttplugBudle\ClientFactory\ClientFactory``. The built-in services are:
107
104
108
105
* ``httplug.factory.curl``
109
106
* ``httplug.factory.guzzle5``
@@ -161,40 +158,40 @@ You can configure a client with authentication. Valid authentication types are `
\* *These services are always an alias to another service. You can specify your own service or leave the default, which is the same name with `.default` appended.*
193
190
194
191
195
-
Useage for Reusable Bundles
192
+
Usage for Reusable Bundles
196
193
``````````````````````````
197
194
198
-
Rather than code against specific HTTP clients, you want to use the Httplug ``Client`` interface. To avoid building your own infrastructure to define services for the client, simply ``require: php-http/httplug-bundle`` in your bundles ``composer.json``. You SHOULD provide a configuration option to specify the which HTTP client service to use for each of your services. This option should default to ``httplug.client``. This way, the default case needs no additional configuration for your users, but they have the option of using specific clients with each of your services.
195
+
Rather than code against specific HTTP clients, you want to use the HTTPlug ``Client`` interface. To avoid building your own infrastructure to define services for the client, simply ``require: php-http/httplug-bundle`` in your bundles ``composer.json``. You SHOULD provide a configuration option to specify the which HTTP client service to use for each of your services. This option should default to ``httplug.client``. This way, the default case needs no additional configuration for your users, but they have the option of using specific clients with each of your services.
199
196
200
-
The only steps they need is ``require`` one of the adapter implementations in their projects ``composer.json`` and instantiating the HttplugBundle in their kernel.
197
+
The only steps they need is ``require`` one of the adapter implementations in their projects ``composer.json`` and instantiating the ``HttplugBundle`` in their kernel.
0 commit comments