hyperium / http

Rust HTTP types
Apache License 2.0
1.15k stars 285 forks source link

Implement a non-failing Request builder. #454

Closed kaj closed 3 years ago

kaj commented 3 years ago

Fixes one part of #330. Creating a Request with the builder pattern should not require handling errors unless opting in by using a try_-method (which returns a Result<Builder2>, not a Builder2 with an internal error state).

This is really a breaking change to request::Builder, but rather than suggesting a breaking change directly, I introduce an alternative response::Builder2. If this is accepted, the original response::Builder is deprecated, and in a later release Builder2 can be renamed back to Builder.

kaj commented 3 years ago

Replaced by #483 .