1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 01:53:58 +01:00
guzzle/docs/faq.rst
Michael Dowling 7368075cf9 Replacing HeaderValuesInterface with an array and adding docs.
- Instead of using a HeaderValues object for header values, I've added an
optional argument to getHeader() that specifies whether or not to return
a header as a string or an array.
- Adding the start of the new documentation.
2014-02-12 20:07:05 -08:00

48 lines
1.4 KiB
ReStructuredText

===
FAQ
===
Is it possible to use Guzzle 3 and 4 in the same project?
=========================================================
Yes. (it will be, WIP)
How do I migrate from Guzzle 3 to 4?
====================================
TODO
What is this Maximum function nesting error?
============================================
Maximum function nesting level of '100' reached, aborting
You could run into this error if you have the XDebug extension installed and
you execute a lot of requests in callbacks. This error message comes
specifically from the XDebug extension. PHP itself does not have a function
nesting limit. Change this setting in your php.ini to increase the limit::
xdebug.max_nesting_level = 1000
[`source <http://stackoverflow.com/a/4293870/151504>`_]
Why am I getting a 417 error response?
======================================
This can occur for a number of reasons, but if you are sending PUT, POST, or
PATCH requests with an ``Expect: 100-Continue`` header, a server that does not
support this header will return a 417 response. You can work around this by
setting the ``expect`` request option to ``false``:
.. code-block:: php
$client = new GuzzleHttp\Client();
// Disable the expect header on a single request
$response = $client->put('/', [], 'the body', [
'expect' => false
]);
// Disable the expect header on all client requests
$client->setConfig('defaults/expect', false)