Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions doc/book/zend.http.client.adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ built-in fsockopen() function, and does not require any special extensions or co
The Socket adapter allows several extra configuration options that can be set using
`Zend\Http\Client->setOptions()` or passed to the client constructor.

> ## Note
> ### Note
#### Persistent TCP Connections
Using persistent *TCP* connections can potentially speed up *HTTP* requests - but in most use cases,
will have little positive effect and might overload the *HTTP* server you are connecting to.
Expand All @@ -41,7 +41,8 @@ both the client speed and server load before using this option.
Additionally, when using persistent connections it is recommended to enable Keep-Alive *HTTP*
requests as described in \[the configuration section\](zend.http.client.options)- otherwise
persistent connections might have little or no effect.
#### note

> ### Note
#### HTTPS SSL Stream Parameters
`ssltransport`, `sslcert` and `sslpassphrase` are only relevant when connecting using *HTTPS*.
While the default *SSL* settings should work for most applications, you might need to change them if
Expand Down Expand Up @@ -132,7 +133,7 @@ $opts = stream_context_get_options($adapter->getStreamContext());
echo $opts['ssl']['peer_certificate'];
```

> ## Note
> ### Note
Note that you must set any stream context options before using the adapter to perform actual
requests. If no context is set before performing *HTTP* requests with the Socket adapter, a default
stream context will be created. This context resource could be accessed after performing any
Expand Down Expand Up @@ -182,7 +183,7 @@ As mentioned, if `proxy_host` is not set or is set to a blank string, the connec
to a regular direct connection. This allows you to easily write your application in a way that
allows a proxy to be used optionally, according to a configuration parameter.

> ## Note
> ### Note
Since the proxy adapter inherits from `Zend\Http\Client\Adapter\Socket`, you can use the stream
context access method (see \[this section\](zend.http.client.adapters.socket.streamcontext)) to set
stream context options on Proxy connections as demonstrated above.
Expand Down
6 changes: 3 additions & 3 deletions doc/book/zend.http.client.advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ on the server side. In the second example, the existing file `/tmp/Backup.tar.gz
server and will be available as `$_FILES['bufile']`. The content type will be guessed automatically
if possible - and if not, the content type will be set to 'application/octet-stream'.

> ## Note
> ### Note
#### Uploading files
When uploading files, the *HTTP* request content-type is automatically set to multipart/form-data.
Keep in mind that you must send a POST or PUT request in order to upload files. Most servers will
Expand Down Expand Up @@ -211,7 +211,7 @@ $client->send();
The data should be available on the server side through *PHP*'s `$HTTP_RAW_POST_DATA` variable or
through the `php://input` stream.

> ## Note
> ### Note
#### Using raw POST data
Setting raw POST data for a request will override any POST parameters or file uploads. You should
not try to use both on the same request. Keep in mind that most servers will ignore the request body
Expand Down Expand Up @@ -255,7 +255,7 @@ request-specific parameters are cleared, you should use the `resetParameters()`
that GET and POST parameters, request body and headers are reset and are not reused in the next
request.

> ## Note
> ### Note
#### Resetting parameters
Note that cookies are not reset by default when the `resetParameters()` method is used. To clean all
cookies as well, use `resetParameters(true)`, or call `clearCookies()` after calling
Expand Down
2 changes: 1 addition & 1 deletion doc/book/zend.http.client.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $client = new Client();
$response = $client->send($request);
```

> ## Note
> ### Note
`Zend\Http\Client` uses `Zend\Uri\Http` to validate URLs. See the Zend\\\\Uri manual
page<zend.uri> for more information on the validation process.

Expand Down