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: README.md
+37-37Lines changed: 37 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ For information how to write applications with the services provided by this bun
51
51
| httplug.stream_factory | Service* that provides the `Http\Message\StreamFactory`
52
52
| httplug.client.[name] | This is your Httpclient that you have configured. With the configuration below the name would be `acme_client`.
53
53
| 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 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.
55
55
56
56
\**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.*
57
57
@@ -60,21 +60,21 @@ If you need a more custom setup, define the services in your application configu
60
60
61
61
```yaml
62
62
httplug:
63
-
clients:
64
-
acme_client: # This is the name of the client
63
+
clients:
64
+
acme_client: # This is the name of the client
65
65
factory: 'httplug.factory.guzzle6'
66
66
67
-
main_alias:
68
-
client: httplug.client.default
69
-
message_factory: httplug.message_factory.default
70
-
uri_factory: httplug.uri_factory.default
71
-
stream_factory: httplug.stream_factory.default
72
-
classes:
73
-
# uses discovery if not specified
74
-
client: ~
75
-
message_factory: ~
76
-
uri_factory: ~
77
-
stream_factory: ~
67
+
main_alias:
68
+
client: httplug.client.default
69
+
message_factory: httplug.message_factory.default
70
+
uri_factory: httplug.uri_factory.default
71
+
stream_factory: httplug.stream_factory.default
72
+
classes:
73
+
# uses discovery if not specified
74
+
client: ~
75
+
message_factory: ~
76
+
uri_factory: ~
77
+
stream_factory: ~
78
78
```
79
79
80
80
@@ -84,21 +84,21 @@ You can configure your clients with some good default options. The clients are l
84
84
85
85
```yaml
86
86
httplug:
87
-
clients:
88
-
my_guzzle5:
89
-
factory: 'httplug.factory.guzzle5'
90
-
config:
91
-
# These options are given to Guzzle without validation.
92
-
defaults:
93
-
base_uri: 'http://google.se/'
94
-
verify_ssl: false
95
-
timeout: 4
96
-
headers:
97
-
Content-Type: 'application/json'
98
-
acme:
99
-
factory: 'httplug.factory.guzzle6'
100
-
config:
101
-
base_uri: 'http://google.se/'
87
+
clients:
88
+
my_guzzle5:
89
+
factory: 'httplug.factory.guzzle5'
90
+
config:
91
+
# These options are given to Guzzle without validation.
92
+
defaults:
93
+
base_uri: 'http://google.se/'
94
+
verify_ssl: false
95
+
timeout: 4
96
+
headers:
97
+
Content-Type: 'application/json'
98
+
acme:
99
+
factory: 'httplug.factory.guzzle6'
100
+
config:
101
+
base_uri: 'http://google.se/'
102
102
103
103
```
104
104
@@ -116,18 +116,18 @@ You can configure the clients with plugins.
0 commit comments