Skip to content

Commit a138e5d

Browse files
committed
Added docs about how to configure plugins
1 parent a34106e commit a138e5d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ For information how to write applications with the services provided by this bun
5151
| httplug.stream_factory | Service* that provides the `Http\Message\StreamFactory`
5252
| httplug.client.[name] | This is your Httpclient that you have configured. With the configuration below the name would be `acme_client`.
5353
| httplug.client | This is the first client configured or a client named `default`.
54-
| httplug.plugin.content_length <br> httplug.plugin.decoder<br> httplug.plugin.error<br> httplug.plugin.logger<br> httplug.plugin.redirect<br> httplug.plugin.retry | These are built in plugins that live in the `php-http/plugins` package. These servcies are not public and may only be used when configure HttpClients or services.
54+
| httplug.plugin.content_length <br> httplug.plugin.decoder<br> httplug.plugin.error<br> httplug.plugin.logger<br> httplug.plugin.redirect<br> httplug.plugin.retry | These are plugins that are enabled by default. These services are not public and may only be used when configure HttpClients or other services.
55+
| httplug.plugin.authentication <br> httplug.plugin.cache<br> httplug.plugin.cookie<br> httplug.plugin.history<br> httplug.plugin.stopwatch | These are plugins that are disabled by default. They need to be configured before they can be used. These services are not public and may only be used when configure HttpClients or other services.
5556

5657
\* *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.*
5758

@@ -122,10 +123,13 @@ acme_plugin:
122123
```yaml
123124
// config.yml
124125
httpug:
126+
plugins:
127+
cache:
128+
cache_pool: 'my_cache_pool'
125129
clients:
126130
acme:
127131
factory: 'httplug.factory.guzzle6'
128-
plugins: ['acme_plugin' , 'httplug.plugin.logger']
132+
plugins: ['acme_plugin', 'httplug.plugin.logger', ''httplug.plugin.cache']
129133
config:
130134
base_uri: 'http://google.se/'
131135
```

0 commit comments

Comments
 (0)