265 Commits

Author SHA1 Message Date
Mohamed Daahir
04c9e26700 Merge branch 'master' into response-meta 2023-02-19 14:10:58 +00:00
Mohamed Daahir
03e866ccf8 replace google.com with example.com 2023-02-02 21:44:25 +00:00
ducaale
a7316fc266 Merge branch 'master' into response-meta 2023-01-03 00:05:36 +02:00
ducaale
0817ddefa6 Merge branch 'master' into header-and-querystring-from-file 2022-12-27 14:39:36 +02:00
ducaale
b2c02a9875 fix another clippy warning 2022-12-20 21:11:39 +02:00
Shun Sakai
da2705b833 Apply suggested changes
Change error message when parsing connection timeout.

Co-authored-by: Jan Verbeek <jan.verbeek@posteo.nl>
2022-12-12 15:34:46 +09:00
Shun Sakai
e7d88f08a6 Fix panic when parsing connection timeout 2022-12-12 13:57:53 +09:00
ducaale
0ef667a3c3 disable cert verify tests for native-tls 2022-11-20 14:41:28 +00:00
ducaale
e223895700 Merge branch 'master' into response-meta 2022-11-13 22:28:48 +00:00
ducaale
cfec8f9be1 support reading query params from a file 2022-11-13 22:02:08 +00:00
ducaale
967aad950c support reading header from a file 2022-11-13 22:02:08 +00:00
ducaale
ea4b6933be temporarily disable tests that depend on 1.1.1.1 2022-11-05 16:00:27 +00:00
ducaale
7b51c4905c fix remaining needless-borrows 2022-11-05 14:53:05 +00:00
ducaale
107c6f7094 fix needless_borrow warnings
it looks like IntoIterator was implemented for arrays since Rust 1.53.0
2022-11-05 14:12:00 +00:00
Jakub Jirutka
01c4cb1198 allow to build with native-tls only
Bundling (static linking) TLS library is a very bad idea from the
security perspective and Linux distributions try to avoid it. This
will allow to build xh with native-tls (i.e. dynamically linked
system-provided TLS library) only, without rustls.
2022-10-05 00:40:40 +01:00
Javier Goday
ee571e62e0
Update tests/cli.rs
Co-authored-by: Mohamed Daahir <sharaf.13@hotmail.com>
2022-09-24 17:58:44 +02:00
Javier Goday
5d6f7fc82e #277: Warn users when --follow + non GET method (redirects do not retain http method) 2022-09-24 15:04:28 +02:00
zuisong
4dbc8c4ae3 change test website 2022-09-11 21:34:33 +08:00
zuisong
69e09e01dc update ipv4test 2022-09-11 21:17:26 +08:00
zuisong
dd1f94ecc6 add feature ipv6-tests for real ipv6 test 2022-09-10 22:13:15 +08:00
zuisong
2137550b80 support forcing ipv4/ipv6 2022-09-06 10:19:12 +08:00
ducaale
97e564b5d8 add tests for response meta 2022-08-20 13:35:05 +01:00
Mohamed Daahir
7074e1c3f7
Merge pull request #267 from porglezomp-misc/bearer-netrc
Support for bearer auth in .netrc
2022-08-12 21:04:21 +01:00
Cassie Jones
eac4259f81 Add CLI tests for --auth-type=bearer + .netrc 2022-08-10 09:41:27 -07:00
ducaale
5df733791c fix clippy error 2022-07-30 14:58:21 +03:00
ducaale
701ed93ae7 support runner with arguments
e.g /linux-runner armv7
2022-07-30 14:32:10 +03:00
Mohamed Daahir
8c699cfd9b
Merge pull request #217 from ducaale/nested-json
Add support for nested json syntax
2022-06-09 20:18:30 +01:00
ducaale
bb4904da51 test json path special chars escaping in --form 2022-06-09 20:17:38 +01:00
ducaale
34a74c22dd test nested_json type error output 2022-06-06 21:14:44 +01:00
Shun Sakai
14d2dbefce Add some exit status
The exit status will be 2 when the request timed out, and the exit
status will be 6 when the redirect exceeds `--max-redirects <NUM>`.
This is the same behavior as HTTPie.
2022-05-22 18:02:53 +09:00
ducaale
580ae5d906 handle empty gzip responses with content-length > 0 2022-05-14 19:35:57 +01:00
Mohamed Daahir
5f2e7a398a
Merge pull request #241 from ducaale/disable-reqwest-decompression
Replace reqwest's auto-decompression with a custom one
2022-04-16 19:14:32 +01:00
ducaale
5fbe30efdd use pre-compressed data for tests 2022-04-15 15:15:05 +01:00
ducaale
a51509f011 remove warning in get_compression_type 2022-04-15 00:27:19 +01:00
ducaale
572dcee524 add tests for response decompression 2022-03-20 21:45:16 +00:00
ducaale
535adb9426 add test for multiple headers with same key 2022-03-19 21:23:08 +00:00
Shun Sakai
47aceba24c Fix redundant closure 2022-03-11 23:26:38 +09:00
Shun Sakai
4209d9adfc Fix unreadable literal 2022-03-11 21:19:50 +09:00
Shun Sakai
6d52b464d1 Fix readability of for loop 2022-03-11 20:45:50 +09:00
ducaale
d2eb5ba6f4 Update to httpie's latest nested json spec
- Numbers can be escaped in order to be treated as string
  e.g foo[\5]=hello.
- Data type clashes will lead to a hard error e.g foo[x]=5 foo[]=6
  or x=5 x[x]=7.
- The "append by default" behavior has been abandoned e.g x=1 x=2 equals
  {"x": "1"} instead of {"x": ["1", "2"]}.
2022-02-05 19:16:24 +00:00
ducaale
438b0d181a pass raw_key to json_path parser 2022-02-05 18:59:34 +00:00
ducaale
27a10f400b add support for nested json syntax 2022-02-05 18:59:34 +00:00
ducaale
477fbff466 default to a different config_dir during tests 2022-01-21 23:40:33 +00:00
ducaale
b8ca1bf0d4 check output in tilde_expanded_in_request_items 2021-12-04 12:43:29 +02:00
ducaale
4c5d36ea13 expand tilde in request items that contain a path 2021-12-03 22:26:34 +02:00
Jan Verbeek
adcd19441f Add browser-style text encoding detection
- If there's no explicit encoding it's detected using BOM sniffing or
  using chardetng, which was made for Firefox.

- BOM sniffing is no longer used when the encoding is explicit.

- Streaming and non-streaming decodes now behave the same.
2021-12-02 15:19:25 +01:00
Jan Verbeek
9f7f548304 Ignore user netrc in tests 2021-12-01 21:44:00 +01:00
ducaale
30c60ed280 pipe binary data directly in tests 2021-11-30 15:10:06 +02:00
ducaale
16f4bd5508 add tests for default method, --raw and stdin 2021-11-29 20:11:19 +02:00
ducaale
e397720d1f add tests for --raw 2021-11-29 16:48:23 +02:00