Skip to content

Commit eab2a14

Browse files
authored
Merge pull request #8295 from kenjis/docs-curlrequest.rst
docs: improve curlrequest.rst
2 parents 9a6c97f + 625db4b commit eab2a14

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

user_guide_src/source/libraries/curlrequest.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,10 @@ a Response instance to you. This takes the HTTP method, the url and an array of
8383

8484
.. literalinclude:: curlrequest/005.php
8585

86+
.. important:: By default, CURLRequest will throw ``HTTPException`` if the HTTP
87+
code returned is greater than or equal to 400. If you want to get the response,
88+
see the `http_errors`_ option.
89+
8690
.. 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.
8791

8892
Since the response is an instance of ``CodeIgniter\HTTP\Response`` you have all of the normal information
@@ -112,12 +116,12 @@ examples of how the combinations are resolved.
112116
===================== ================ ========================
113117
baseURI URI Result
114118
===================== ================ ========================
115-
`http://foo.com` /bar `http://foo.com/bar`
116-
`http://foo.com/foo` /bar `http://foo.com/bar`
117-
`http://foo.com/foo` bar `http://foo.com/bar`
118-
`http://foo.com/foo/` bar `http://foo.com/foo/bar`
119-
`http://foo.com` `http://baz.com` `http://baz.com`
120-
`http://foo.com/?bar` bar `http://foo.com/bar`
119+
\http://foo.com /bar \http://foo.com/bar
120+
\http://foo.com/foo /bar \http://foo.com/bar
121+
\http://foo.com/foo bar \http://foo.com/bar
122+
\http://foo.com/foo/ bar \http://foo.com/foo/bar
123+
\http://foo.com \http://baz.com \http://baz.com
124+
\http://foo.com/?bar bar \http://foo.com/bar
121125
===================== ================ ========================
122126

123127
Using Responses

0 commit comments

Comments
 (0)