174 Commits

Author SHA1 Message Date
Jan Verbeek
b7857f138a Rework help printing, split off --bearer from --auth
--help now prints short help again, while help as a subcommand prints
long help.

--auth only does basic authentication, --auth-type is removed, and
--bearer does bearer authentication.
2021-02-16 01:04:28 +01:00
Stefan Zwanenburg
6e1e27819d Moved proxy argument parsing tests into cli.rs, and added proxy integration tests 2021-02-15 21:03:55 +01:00
Stefan Zwanenburg
75bfbc224e Merge remote-tracking branch 'origin/develop' into proxy-flags 2021-02-15 15:20:31 +01:00
Stefan Zwanenburg
b2edc97c66 Remove angled brackets from value_name for --proxy option 2021-02-15 15:17:07 +01:00
jihchi
67e7589dfd Simplify assertions such that it won't easily break in the future 2021-02-15 22:15:22 +08:00
jihchi
b93ea7cdfc Add --verify, --cert and --cert-key arguments 2021-02-15 22:03:45 +08:00
Stefan Zwanenburg
3467ed0dab Added a few cases to test --proxy 2021-02-15 14:50:35 +01:00
Jan Verbeek
f2a30eac87 Use httpmock for tests 2021-02-14 23:38:24 +01:00
Jan Verbeek
c4bb865628 Remove unnecessary Result return types (Clippy) 2021-02-13 23:27:11 +01:00
ducaale
eb06d65800 fix failing test 2021-02-12 19:11:45 +00:00
Mohamed Daahir
67dc66e343
Merge pull request #53 from ducaale/rename-to-xh
Rename from ht to xh
2021-02-12 18:55:41 +00:00
ducaale
6828921b0e replace ht references with xh 2021-02-12 07:49:20 +00:00
Jan Verbeek
8f75277e1b Allow form value regex to match newlines 2021-02-09 08:23:46 +01:00
Jan Verbeek
028cbb0165 Bubble errors up to main() instead of panicking
In theory, all panics after this should be bugs instead of normal
error conditions.

The error reporting may still need finetuning. For example, if the
hostname doesn't resolve you get a redundant traceback:

```
Error: error sending request for url (http://bad-hostname/): error trying to connect: dns error: failed to lookup address information: Name or service not known

Caused by:
    0: error trying to connect: dns error: failed to lookup address information: Name or service not known
    1: dns error: failed to lookup address information: Name or service not known
    2: failed to lookup address information: Name or service not known
```

This commit also fixes all of the remaining Clippy warnings.

Resolves #14 (?)
2021-02-07 20:59:07 +01:00
Mohamed Daahir
5c3302919e
Merge pull request #33 from blyxxyz/user-agent
Add User-Agent header
2021-02-07 17:08:27 +00:00
Jan Verbeek
afca6649ff Add User-Agent header 2021-02-07 16:09:16 +01:00
Pascal Lombard
3ed6ba8775 - Test directly against httpbin.org/json. 2021-02-07 13:48:38 +01:00
Pascal Lombard
c56797747f - Add OPTIONS http method. 2021-02-07 11:26:55 +01:00
Samuel Marks
81c4da7bfd
[*.rs] rustfmt 2021-02-07 17:15:50 +11:00
Till H
2488176989 Add support for HEAD
- Support HEAD requests
2021-02-06 11:16:07 +01:00
ducaale
bb71be462c avoid setting accept header twice 2021-01-26 21:31:30 +00:00
ducaale
535959c75e rename project to ht 2020-12-31 22:32:07 +03:00
ducaale
f63b2c632e fix test 2020-12-11 23:35:00 +00:00
ducaale
6c5073a082 experiment with testing the cli 2020-12-04 23:39:30 +00:00