Skip to content
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

docs: improve curlrequest.rst #8295

Merged
merged 2 commits into from
Dec 6, 2023
Merged
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
16 changes: 10 additions & 6 deletions user_guide_src/source/libraries/curlrequest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ a Response instance to you. This takes the HTTP method, the url and an array of

.. literalinclude:: curlrequest/005.php

.. important:: By default, CURLRequest will throw ``HTTPException`` if the HTTP
code returned is greater than or equal to 400. If you want to get the response,
see the `http_errors`_ option.

.. note:: When ``$shareOptions`` is false, the options passed to the method will be used for the request. After sending the request, they will be cleared. If you want to use the options to all requests, pass the options in the constructor.

Since the response is an instance of ``CodeIgniter\HTTP\Response`` you have all of the normal information
Expand Down Expand Up @@ -112,12 +116,12 @@ examples of how the combinations are resolved.
===================== ================ ========================
baseURI URI Result
===================== ================ ========================
`http://foo.com` /bar `http://foo.com/bar`
`http://foo.com/foo` /bar `http://foo.com/bar`
`http://foo.com/foo` bar `http://foo.com/bar`
`http://foo.com/foo/` bar `http://foo.com/foo/bar`
`http://foo.com` `http://baz.com` `http://baz.com`
`http://foo.com/?bar` bar `http://foo.com/bar`
\http://foo.com /bar \http://foo.com/bar
\http://foo.com/foo /bar \http://foo.com/bar
\http://foo.com/foo bar \http://foo.com/bar
\http://foo.com/foo/ bar \http://foo.com/foo/bar
\http://foo.com \http://baz.com \http://baz.com
\http://foo.com/?bar bar \http://foo.com/bar
===================== ================ ========================

Using Responses
Expand Down