Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit 81c4632

Browse files
committed
Merge pull request #49 from froschdesign/hotfix/docs/40
[Docs] Fixes #40 - Check the tables in a document
2 parents b9bfa60 + 8e20476 commit 81c4632

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

doc/book/zend.http.client.adapters.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,18 @@ be used unless you explicitly set the connection adapter. The Socket adapter is
2828
built-in fsockopen() function, and does not require any special extensions or compilation flags.
2929

3030
The Socket adapter allows several extra configuration options that can be set using
31-
`Zend\Http\Client->setOptions()` or passed to the client constructor.
31+
`Zend\Http\Client->setOptions()` or passed to the client constructor:
32+
33+
Parameter | Description | Expected Type | Default Value
34+
-------------------|--------------------------------------------------------------------------------------|---------------|--------------
35+
persistent | Whether to use persistent TCP connections | boolean | FALSE
36+
ssltransport | SSL transport layer (eg. 'sslv2', 'tls') | string | ssl
37+
sslcert | Path to a PEM encoded SSL certificate | string | NULL
38+
sslpassphrase | Passphrase for the SSL certificate file | string | NULL
39+
sslverifypeer | Whether to verify the SSL peer | string | TRUE
40+
sslcapath | Path to SSL certificate directory | string | NULL
41+
sslallowselfsigned | Whether to allow self-signed certificates | string | FALSE
42+
sslusecontext | Enables proxied connections to use SSL even if the proxy connection itself does not. | boolean | FALSE
3243

3344
> ### Note
3445
#### Persistent TCP Connections
@@ -149,6 +160,14 @@ security or performance reasons.
149160
Using the Proxy adapter requires several additional configuration parameters to be set, in addition
150161
to the default 'adapter' option:
151162

163+
Parameter | Description | Expected Type | Example Value
164+
-------------|--------------------------------|---------------|--------------
165+
`proxy_host` | Proxy server address | string | 'proxy.myhost.com'’ or '10.1.2.3'
166+
`proxy_port` | Proxy server TCP port | integer | 8080 (default) or 81
167+
`proxy_user` | Proxy user name, if required | string | 'shahar' or '' for none (default)
168+
`proxy_pass` | Proxy password, if required | string | 'secret' or '' for none (default)
169+
`proxy_auth` | Proxy HTTP authentication type | string | `Zend\Http\Client::AUTH_BASIC` (default)
170+
152171
`proxy_host` should always be set - if it is not set, the client will fall back to a direct
153172
connection using `Zend\Http\Client\Adapter\Socket`. `proxy_port` defaults to '8080' - if your proxy
154173
listens on a different port you must set this one as well.

doc/book/zend.http.client.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,20 @@ The constructor and setOptions() method accepts an associative array of configur
7272
a `Zend\Config\Config` object. Setting these parameters is optional, as they all have default
7373
values.
7474

75+
Parameter | Description | Expected Values | Default Value
76+
------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|--------------
77+
`maxredirects` | Maximum number of redirections to follow (0 = none) | integer | 5
78+
`strictredirects` | Whether to strictly follow the RFC when redirecting (see this section) | boolean | FALSE
79+
`useragent` | User agent identifier string (sent in request headers) | string | `Zend\Http\Client`
80+
`timeout` | Connection timeout (seconds) | integer | 10
81+
`httpversion` | HTTP protocol version (usually '1.1' or '1.0') | string | 1.1
82+
`adapter` | Connection adapter class to use (see this section) | mixed | `Zend\Http\Client\Adapter\Socket`
83+
`keepalive` | Whether to enable keep-alive connections with the server. Useful and might improve performance if several consecutive requests to the same server are performed. | boolean | FALSE
84+
`storeresponse` | Whether to store last response for later retrieval with getLastResponse(). If set to FALSE, getLastResponse() will return NULL. | boolean | TRUE
85+
`encodecookies` | Whether to pass the cookie value through urlencode/urldecode. Enabling this breaks support with some web servers. Disabling this limits the range of values the cookies can contain. | boolean | TRUE
86+
`outputstream` | Destination for streaming of received data (options: string (filename), true for temp file, false/null to disable streaming) | boolean | FALSE
87+
`rfc3986strict` | Whether to strictly adhere to RFC 3986 (in practice, this means replacing '+' with '%20') | boolean | FALSE
88+
7589
The options are also passed to the adapter class upon instantiation, so the same array or
7690
`Zend\Config\Config` object) can be used for adapter configuration. See the Zend Http Client adapter
7791
section<zend.http.client.adapters> for more information on the adapter-specific options

0 commit comments

Comments
 (0)