-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
feat(client): add a new Client struct with super powers #182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -64,22 +60,20 @@ fn main() { | |||
[Client Bench:](./benches/client.rs) | |||
|
|||
``` | |||
|
|||
running 3 tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "running 2 tests"?
❤️ the design :) I'm not entirely certain if it does this already, but if not in the future we might want to be able to have |
req.start().unwrap() | ||
.send().unwrap() | ||
.read_to_string().unwrap() | ||
client.request(RequestOptions { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of building this RequestOptions
struct, which will break if we add fields in the future, I think it would be best if client.request()
returned a builder type, that way we can add more options without breaking existing code.
@reem updated |
Can we move the |
Yep, that's exactly what I was working on right now. |
@reem like that? |
Yup, looks great. Rebase? |
0c9755b
to
dfa3431
Compare
- Includes ergonomic traits like IntoUrl and IntoBody, allowing easy usage. - Client can have a RedirectPolicy. - Client can have a SslVerifier. Updated benchmarks for client. (Disabled rust-http client bench since it hangs.)
finally green! |
feat(client): add a new Client struct with super powers
\o/ |
usage.
Updated benchmarks for client. (Disabled rust-http client bench since it
hangs.)
Closes #62