Skip to content

Add a warning about missing headers on the request #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 3, 2016
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
11 changes: 11 additions & 0 deletions clients/socket-client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,15 @@ use case would be::
];
$client = new Client($messageFactory, $options);

.. warning::

This client assumes that the request is compliant with HTTP 2.0, 1.1 or 1.0 standard. So a request without a ``Host`` header, or
with a body but without a ``Content-Length`` will certainly fail.
To make sure all requests will be sent out correctly, we recommend to use the ``PluginClient`` with the following plugins:

* ``ContentLengthPlugin`` sets the correct ``Content-Length`` header, or decorate the stream to use chunked encoding
* ``DecoderPlugin`` decodes encoding coming from the response (chunked, gzip, deflate and compress)

:doc:`Read more on plugins </plugins/introduction>`

.. include:: includes/further-reading-sync.inc
1 change: 1 addition & 0 deletions spelling_word_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ auth
backtrace
boolean
callables
chunked
cURL
Diactoros
Elasticsearch
Expand Down