28 Commits

Author SHA1 Message Date
HoneyryderChuck
092e594a4b Request.verb is now an upcased string (ex: "GET")
The reference for a request verb is now the string which is used
everywhere else, instead of the symbol corresponding to it. This was an
artifact from the import from httprb, and there is no advantage in it,
since these strings are frozen in most use cases, and the
transformations from symbol to strings being performed everywhere are
prooof that keeping the atom isn't really bringing any benefit.
2023-04-17 16:54:31 +03:00
HoneyryderChuck
71cb66e287 added missing options sig 2022-08-07 14:43:29 +01:00
HoneyryderChuck
3f9c165d51 added request_timeout 2022-08-06 23:20:21 +01:00
HoneyryderChuck
452657c805 Added the read_timeout and write_timeout timeouts
These are deadline oriented for the request and response, i.e. a write
timeout tracks the full time it takes to write the request, whereas the
read timeout does the same for receiving the response.

For back-compat, they're infinite by default. v1 may change that, and
will have to provide a safe fallback for endless "stream" requests and
responses.
2022-08-06 22:30:46 +01:00
HoneyryderChuck
ee49d7452c added tests for read and write timeout 2022-08-06 22:30:46 +01:00
HoneyryderChuck
e9a81d6b16 enabled h2 tests which were blocked for jruby 2022-03-05 17:33:37 +00:00
HoneyryderChuck
5c2ad6b588 allow definition of options via OptionsMethods module; using .extra_options for setting defaults 2021-07-13 19:56:59 +01:00
HoneyryderChuck
1cf6e5aac7 new option: origin
by setting the origin, one can pass relative paths to httpx, which will
be appended when building the request.
2021-05-04 20:09:50 +01:00
HoneyryderChuck
00faafddc9 added tests around the tcp connect errors 2021-03-11 17:58:24 +00:00
HoneyryderChuck
fab44b5993 verifyig error responses annd deltas using internal methods 2021-01-05 18:57:39 +00:00
HoneyryderChuck
bb310dc106 making the connection ping when keep alive timeout is exceeded; this way if the connection is still available, it's reused 2020-05-03 16:28:58 +01:00
HoneyryderChuck
f6475009fe now that the timer interval is used in the selector, make sure that timeouts from selecting are properly reflected as total timeouts when they are 2020-04-12 03:32:04 +01:00
HoneyryderChuck
fef2d78382 show what happened if not the timeout 2020-04-05 04:26:43 +01:00
HoneyryderChuck
bc65c44e21 do not run keep alive test for ruby < 2.3, as our HTTP/1 server does not support keep alive 2020-03-30 02:31:22 +01:00
HoneyryderChuck
36134dd826 added test for keep alive timeout 2020-03-30 01:13:58 +01:00
HoneyryderChuck
adc0e71c7f commenting connect timeout test (not there yet) 2020-03-15 02:18:24 +00:00
HoneyryderChuck
89fde80f10 reenabled timeout tests again 2020-03-14 22:42:02 +00:00
HoneyryderChuck
108d9257c8 added support for HTTP#with_ methods
these will reapply options accordingly (i.e. HTTPX.with_headers(...)).

Because we now have these, HTTPX.headers and HTTPX.timeout have been
deprecated.
2020-03-10 18:58:31 +00:00
HoneyryderChuck
731db5691b moving resolver tests to the mainline requests 2020-02-02 09:41:30 +01:00
HoneyryderChuck
07c22470a9 added regression test for the reported failure 2020-01-26 20:39:34 +00:00
HoneyryderChuck
ae3cbac91d disabling connect timeout for CI 2020-01-12 21:42:12 +00:00
HoneyryderChuck
4dd40464f6 connect error: give time to the server to boot up, just in case 2020-01-11 13:24:39 +00:00
HoneyryderChuck
e4e04e9fe8 setting the connect timeout port as envvar 2020-01-11 13:19:21 +00:00
HoneyryderChuck
066ff44762 moved timeout tests to the session, as they are not supposed to be differentiated in http/https terms 2019-12-31 01:57:00 +00:00
HoneyryderChuck
ae859f743f request exposes options: this allows responses to be created with the proper set of options, instead of the connection options, which is wrong 2019-05-06 11:56:11 +00:00
HoneyryderChuck
ce9f55c96e pool: allowing it to load more than one resolver per pool, depending on connection conditions; still reusing it whenever possible (right now, per type, which is still wrong, if we want to connect, let's say, to more than a different DNS server with the same type) 2019-04-27 15:51:37 +00:00
HoneyryderChuck
c1c0c536eb Client -> Session (signal this as deprecation, as this is public API 2019-03-16 16:32:33 +00:00
HoneyryderChuck
05543d12f6 not a TODO anymore 2019-03-16 16:24:44 +00:00