Skip to content

Commit 00e8328

Browse files
committed
Updates
1 parent b8971bd commit 00e8328

File tree

2 files changed

+46
-39
lines changed

2 files changed

+46
-39
lines changed

integrations/symfony-bundle.rst

Lines changed: 44 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ Usage
1616
factory: 'httplug.factory.guzzle6'
1717
plugins: ['httplug.plugin.logger']
1818
config:
19+
verify: false
20+
timeout: 2
1921
2022
.. code-block:: php
2123
@@ -25,7 +27,7 @@ Usage
2527
Installation
2628
````````````
2729

28-
Install the Httplug bundle with composer and enabled it in your AppKernel.php.
30+
Install the Httplug bundle with composer and enable it in your AppKernel.php.
2931

3032
.. code-block:: bash
3133
@@ -43,18 +45,18 @@ Install the Httplug bundle with composer and enabled it in your AppKernel.php.
4345
4446
You will find all available configuration at the :doc:`full configuration </integrations/symfony-full-configuration>` page.
4547

46-
Web debug toolbar
48+
Web Debug Toolbar
4749
`````````````````
48-
.. image:: assets/img/debug-toolbar.png
50+
.. image:: /assets/img/debug-toolbar.png
4951
:align: right
5052
:width: 120px
5153

52-
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.
54+
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.
5355

54-
Discovery of factory classes
56+
Discovery of Factory Classes
5557
````````````````````````````
5658

57-
If you want to automatically find our factory classes you should install and enabled ``puli/symfony-bundle``. If you do not want use auto discovery you should specify all the factory classes for you client. The following example show how you configure factory classes using Guzzle.
59+
If you want the bundle to automatically find usable factory classes, install and enable ``puli/symfony-bundle``. If you do not want use auto discovery, you need to specify all the factory classes for you client. The following example show how you configure factory classes using Guzzle:
5860

5961
.. code-block:: yaml
6062
@@ -67,8 +69,8 @@ If you want to automatically find our factory classes you should install and ena
6769
6870
6971
70-
Configure your client
71-
`````````````````````
72+
Configure Clients
73+
`````````````````
7274

7375
You can configure your clients with default options. These default values will be specific to you client you are using. The clients are later registered as services.
7476

@@ -99,6 +101,10 @@ You can configure your clients with default options. These default values will b
99101
// will be the same as ``httplug.client.my_guzzle5``
100102
$httpClient = $this->container->get('httplug.client');
101103
104+
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:
105+
106+
* ``httplug.factory.guzzle5``
107+
* ``httplug.factory.guzzle6``
102108

103109
Plugins
104110
```````
@@ -147,38 +153,38 @@ You can configure a client with authentication. Valid authentication types are `
147153
plugins: ['httplug.plugin.authentication.my_wsse']
148154
149155
150-
List of services
156+
List of Services
151157
````````````````
152158

153-
+----------------------------------+---------------------------------------------------------------------+
154-
| Service id | Description |
155-
+==================================+=====================================================================+
156-
| httplug.message_factory | Service* that provides the `Http\Message\MessageFactory` |
157-
+----------------------------------+---------------------------------------------------------------------+
158-
| httplug.uri_factory | Service* that provides the `Http\Message\UriFactory` |
159-
+----------------------------------+---------------------------------------------------------------------+
160-
| httplug.stream_factory | Service* that provides the `Http\Message\StreamFactory` |
161-
+----------------------------------+---------------------------------------------------------------------+
162-
| httplug.client.[name] | | This is your HttpClient that you have configured. |
163-
| | | With the configuration below the name would be `acme_client`. |
164-
+----------------------------------+---------------------------------------------------------------------+
165-
| httplug.client | This is the first client configured or a client named `default`. |
166-
+----------------------------------+---------------------------------------------------------------------+
167-
| | httplug.plugin.content_length | | These are plugins that are enabled by default. |
168-
| | httplug.plugin.decoder | | These services are not public and may only be used when configure |
169-
| | httplug.plugin.error | | HttpClients or other services. |
170-
| | httplug.plugin.logger | |
171-
| | httplug.plugin.redirect | |
172-
| | httplug.plugin.retry | |
173-
| | httplug.plugin.stopwatch | |
174-
+----------------------------------+---------------------------------------------------------------------+
175-
| | httplug.plugin.cache | | These are plugins that are disabled by default. |
176-
| | httplug.plugin.cookie | | They need to be configured before they can be used. |
177-
| | httplug.plugin.history | | These services are not public and may only be used when configure |
178-
| | | HttpClients or other services. |
179-
+----------------------------------+---------------------------------------------------------------------+
180-
181-
\* *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. The default services in turn use the service discovery mechanism to provide the best available implementation. You can specify a class for each of the default services to use instead of discovery, as long as those classes can be instantiated without arguments.*
159+
+----------------------------------+-------------------------------------------------------------------------+
160+
| Service id | Description |
161+
+==================================+=========================================================================+
162+
| httplug.message_factory | Service* that provides the `Http\Message\MessageFactory` |
163+
+----------------------------------+-------------------------------------------------------------------------+
164+
| httplug.uri_factory | Service* that provides the `Http\Message\UriFactory` |
165+
+----------------------------------+-------------------------------------------------------------------------+
166+
| httplug.stream_factory | Service* that provides the `Http\Message\StreamFactory` |
167+
+----------------------------------+-------------------------------------------------------------------------+
168+
| httplug.client.[name] | There is one service per named client. |
169+
+----------------------------------+-------------------------------------------------------------------------+
170+
| httplug.client | | If there is a client named "default", this service is an alias to |
171+
| | | that client, otherwise it is an alias to the first client configured. |
172+
+----------------------------------+-------------------------------------------------------------------------+
173+
| | httplug.plugin.content_length | | These are plugins that are enabled by default. |
174+
| | httplug.plugin.decoder | | These services are private and should only be used to configure |
175+
| | httplug.plugin.error | | clients or other services. |
176+
| | httplug.plugin.logger | |
177+
| | httplug.plugin.redirect | |
178+
| | httplug.plugin.retry | |
179+
| | httplug.plugin.stopwatch | |
180+
+----------------------------------+-------------------------------------------------------------------------+
181+
| | httplug.plugin.cache | | These are plugins that are disabled by default and only get |
182+
| | httplug.plugin.cookie | | activated when configured. |
183+
| | httplug.plugin.history | | These services are private and should only be used to configure |
184+
| | | clients or other services. |
185+
+----------------------------------+-------------------------------------------------------------------------+
186+
187+
\* *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.*
182188

183189

184190
Use for Reusable Bundles

integrations/symfony-full-configuration.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ This page shows an example of all configuration values provided by the bundle.
7070
factory: 'httplug.factory.guzzle6'
7171
plugins: ['httplug.plugin.authentication.my_wsse', 'httplug.plugin.cache', 'httplug.plugin.retry']
7272
config:
73-
base_uri: 'http://google.se/'
73+
verify: false
74+
timeout: 2
7475
# more options to the guzzle 6 constructor
7576

0 commit comments

Comments
 (0)