Skip to content

Commit

Permalink
Merge pull request #8295 from kenjis/docs-curlrequest.rst
Browse files Browse the repository at this point in the history
docs: improve curlrequest.rst
  • Loading branch information
kenjis authored Dec 6, 2023
2 parents 9a6c97f + 625db4b commit eab2a14
Showing 1 changed file with 10 additions and 6 deletions.
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

0 comments on commit eab2a14

Please sign in to comment.