From 35d7d2941eaa9b1db1f23c6fd8191f39fc5f0dee Mon Sep 17 00:00:00 2001 From: kenjis Date: Wed, 28 Jun 2023 09:30:05 +0900 Subject: [PATCH] docs: update docs --- user_guide_src/source/changelogs/v4.4.0.rst | 3 ++- user_guide_src/source/libraries/curlrequest.rst | 11 +++++++++++ user_guide_src/source/libraries/curlrequest/035.php | 7 +++++++ 3 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 user_guide_src/source/libraries/curlrequest/035.php diff --git a/user_guide_src/source/changelogs/v4.4.0.rst b/user_guide_src/source/changelogs/v4.4.0.rst index e340d33cc667..1668a181cef8 100644 --- a/user_guide_src/source/changelogs/v4.4.0.rst +++ b/user_guide_src/source/changelogs/v4.4.0.rst @@ -95,9 +95,10 @@ Libraries - **Validation:** Added ``Validation::getValidated()`` method that gets the actual validated data. See :ref:`validation-getting-validated-data` for details. - **Images:** The option ``$quality`` can now be used to compress WebP images. - - **Uploaded Files:** Added ``UploadedFiles::getClientPath()`` method that returns the value of the `full_path` index of the file if it was uploaded via directory upload. +- **CURLRequest:** Added a request option ``proxy``. See + :ref:`CURLRequest Class `. Helpers and Functions ===================== diff --git a/user_guide_src/source/libraries/curlrequest.rst b/user_guide_src/source/libraries/curlrequest.rst index 18afd51f771c..b2ecbcdf5f0c 100644 --- a/user_guide_src/source/libraries/curlrequest.rst +++ b/user_guide_src/source/libraries/curlrequest.rst @@ -296,6 +296,17 @@ has been disabled. Any files that you want to send must be passed as instances o ``form_params`` for ``application/x-www-form-urlencoded`` requests, and ``multipart`` for ``multipart/form-data`` requests. +.. _curlrequest-request-options-proxy: + +proxy +===== + +.. versionadded:: 4.4.0 + +You can set a proxy by passing an associative array as the ``proxy`` option: + +.. literalinclude:: curlrequest/035.php + query ===== diff --git a/user_guide_src/source/libraries/curlrequest/035.php b/user_guide_src/source/libraries/curlrequest/035.php new file mode 100644 index 000000000000..a729f9f3be22 --- /dev/null +++ b/user_guide_src/source/libraries/curlrequest/035.php @@ -0,0 +1,7 @@ +request( + 'GET', + 'http://example.com', + ['proxy' => 'http://localhost:3128'] +);