1868 Commits

Author SHA1 Message Date
HoneyryderChuck
718cda2240 Merge branch 'issue-155' into 'master'
custom timers

Closes #155

See merge request honeyryderchuck/httpx!168
2021-09-20 16:51:53 +00:00
HoneyryderChuck
13e865e488 hiding monotonic time funcs under the utils API 2021-09-20 16:16:20 +01:00
HoneyryderChuck
fcc29b2fb1 missing variable to disable jitter under tests 2021-09-20 13:50:48 +01:00
HoneyryderChuck
27d81f3090 introduce custom timer to replace Timers::Group
The HTTPX::Timers class mimicks the same top-level API as its
predecessors, but simplifies its implementation. Adding a timer will
resort all timers, while lookups are roughly the same complexity. The
key difference is that callbacks are now aggregated by interval, i.e.
different requests setting the same timeout, will reuse the same timer.
This is a more simple design than Timers::Group, which stores timers in
a binary search tree; the latter will perform well in any environment,
whereas the first one is more tailored for the use-case of httpx, where
most of the times no timers will be set, and when they do, the same
timer will be reused for all requests because they usually have the same
set of options (and therefore timeouts).
2021-09-20 13:19:55 +01:00
HoneyryderChuck
5146cfae44 fixing the --frontend declaration for nghttpx (CI) 2021-09-20 13:19:55 +01:00
HoneyryderChuck
9d861c3c2f total_timeout does not rely on Timers#after
Instead, timeout accounting is done using total_timeout math. It
supersedes all other timeouts in the connection, and will start from th
moment the connection is established.
2021-09-20 13:19:55 +01:00
HoneyryderChuck
b0e057c15d reworked the keep-alive timer logic to not rely on Timers#after 2021-09-20 13:19:55 +01:00
HoneyryderChuck
bdacaf1d41 Merge branch 'issue-153' into 'master'
Improving API compatibility and error checking in responses

Closes #156 and #153

See merge request honeyryderchuck/httpx!170
2021-09-20 12:19:32 +00:00
HoneyryderChuck
4014d4ec2c Merge branch 'issue-152' into 'master'
ErrorResponse#to_s should not contain tty color codes

Closes #152

See merge request honeyryderchuck/httpx!169
2021-09-20 12:19:22 +00:00
HoneyryderChuck
a31a315e08 deprecating ErrorResponse#status 2021-09-20 13:02:20 +01:00
HoneyryderChuck
f768cf7a0e Improving API compatibility and error checking in responses
* `Response#error`, which, coupled with `ErrorResponse#error`, allows
  for `if response.error` kind of conditional;
* `Response#raise_for_status` now returns the response when no error is
  raise (for method chaining);

Closes #153
2021-09-20 13:02:20 +01:00
HoneyryderChuck
cdce779e44 ErrorResponse#to_s should not contain tty color codes (Closes #152) 2021-09-20 13:01:59 +01:00
HoneyryderChuck
57b74aa144 Merge branch 'fix-jitter-tests' into 'master'
Fix jitter tests

See merge request honeyryderchuck/httpx!172
2021-09-20 12:01:21 +00:00
HoneyryderChuck
dce5c22fa0 fixing latest rubocopz 2021-09-20 12:37:48 +01:00
HoneyryderChuck
6e6c7848cc making jitter a retry plugin option 2021-09-20 12:37:48 +01:00
HoneyryderChuck
cebb606964 fixing jitter-based test assertion 2021-09-12 23:16:08 +01:00
HoneyryderChuck
3b85678834 Merge branch 'issue-150' into 'master'
retries: apply some jitter on the retry after value

Closes #150

See merge request honeyryderchuck/httpx!167
2021-09-12 16:37:52 +00:00
HoneyryderChuck
579ee4d0cc retries: apply some jitter on the retry after value 2021-09-12 16:10:50 +01:00
HoneyryderChuck
d9e5c5b134 Merge branch 'add_webmock_to_timeout' into 'master'
Add support of WebMock's `stub_http_request#to_timeout`

See merge request honeyryderchuck/httpx!165
2021-09-10 17:31:54 +00:00
ojab
9f74a57112
Add support of WebMock's stub_http_request#to_timeout 2021-09-10 17:15:47 +00:00
HoneyryderChuck
24c762a50d Merge branch 'fixup_decoders_mime_error' into 'master'
Fixup decoders content type checks

See merge request honeyryderchuck/httpx!166
2021-09-10 16:05:38 +00:00
ojab
6f3b11eb16
Fixup decoders content type checks 2021-09-10 15:53:38 +00:00
HoneyryderChuck
f13f278011 post - rodauth-oauth with devise-rails 2021-09-08 18:25:41 +01:00
HoneyryderChuck
ddabe52946 Merge branch 'new-cops-enable' into 'master'
New cops enable

See merge request honeyryderchuck/httpx!164
2021-09-04 14:36:06 +00:00
HoneyryderChuck
c96c79537a disabling cops that don't bring benefit 2021-09-04 15:25:14 +01:00
HoneyryderChuck
d350bebe81 integrating .sum and .filter_map + backports 2021-09-04 15:25:14 +01:00
HoneyryderChuck
0575c87dec added example blocks to class_eval defs 2021-09-03 12:52:26 +01:00
HoneyryderChuck
c95e926886 auto-corrected the easy ones first 2021-09-03 12:24:18 +01:00
HoneyryderChuck
21a18652c6 enable new cops 2021-09-02 14:22:08 +01:00
HoneyryderChuck
d58a28d46f added missing info to release docs v0.17.0 2021-08-31 17:16:46 +01:00
HoneyryderChuck
134cb90c2f Merge branch 'limit-rubocop' into 'master'
only run rubocop for latest ruby

See merge request honeyryderchuck/httpx!163
2021-08-31 16:12:06 +00:00
HoneyryderChuck
1a0962615b only run rubocop for latest ruby
the rubocop configs have grown a bit unwieldy as more ruby versions are
deprecated by mainline. Given that rubocop is not a requisite for older
rubies (provided code works), let's keep linting consistency towards
more modern conventions
2021-08-31 16:58:38 +01:00
HoneyryderChuck
b836d79c55 bump version to 0.17.0 2021-08-31 16:47:40 +01:00
HoneyryderChuck
b13e265bd4 Merge branch 'openssl-rbs' into 'master'
more rbs + improvements

See merge request honeyryderchuck/httpx!162
2021-08-31 13:26:43 +00:00
HoneyryderChuck
cdcbf14675 few sig changes (more assertive) 2021-08-31 13:50:29 +01:00
HoneyryderChuck
74dfb18ed3 few extra changes to appease the type checker 2021-08-31 13:50:29 +01:00
HoneyryderChuck
b92829d025 do not needlessly forward method used only once 2021-08-31 13:50:29 +01:00
HoneyryderChuck
b9339a12ae targeting rbs with openssl 2021-08-31 13:50:29 +01:00
HoneyryderChuck
82953f7fe6 Merge branch 'drop_response_body_finalizer' into 'master'
Remove response body finalizer

See merge request honeyryderchuck/httpx!161
2021-08-30 17:28:57 +00:00
ojab
aa3be21c89
Remove response body finalizer
it's unnecessary, see discussion in
https://gitlab.com/honeyryderchuck/httpx/-/merge_requests/159
2021-08-30 14:07:36 +00:00
HoneyryderChuck
f18da78832 Merge branch 'blog' into 'master'
post

See merge request honeyryderchuck/httpx!160
2021-08-30 09:13:40 +00:00
HoneyryderChuck
d4a05a281f enable tests and coverage in blog branch 2021-08-27 12:34:20 +01:00
HoneyryderChuck
84f5c04412 blog post: tensorflow-serving in ruby 2021-08-27 12:32:07 +01:00
HoneyryderChuck
a5a2f0d8f8 blog: added support for meta keywords, changed a bit of the HTML header 2021-08-27 12:32:07 +01:00
HoneyryderChuck
a4649d90a7 Merge branch 'fix-iproute' into 'master'
innstallig iproute2, as it's no longer part of distro

See merge request honeyryderchuck/httpx!158
2021-08-17 16:10:01 +00:00
HoneyryderChuck
2cb3c395a8 innstallig iproute2, as it's no longer part of distro 2021-08-17 16:58:42 +01:00
HoneyryderChuck
e435dd0534 prevent multiple declarations of the host header 2021-08-17 14:09:21 +01:00
HoneyryderChuck
6a69f1cc84 Merge branch 'issue-132' into 'master'
Response decoders

Closes #132

See merge request honeyryderchuck/httpx!157
2021-08-10 15:36:43 +00:00
HoneyryderChuck
f520785572 added content-type filtering to decoders 2021-08-10 13:50:34 +01:00
HoneyryderChuck
c7f177adbb added regexp extensions where using match? 2021-08-10 11:25:36 +01:00