This adds an implementation to convert a `Response` type from the `http`
crate to the `async_impl::Response` type. This is the first step to
allow us to convert `http::Response` objects to `request::Response`
objects
This also adds an extension trait for the `http::response::Builder`
type. The `http::Response` object does not provide a way to access the
"final" url that the response is derived from, so we can't easily
provide that in the `From<http::Response>` implementation. For users who
are manually constructing `http::Response` objects for use in tests,
etc, they can import this extension trait, which adds a `.url()` builder
method that will allow them to pass a `Url`, which we then convert to
our newtype'd Url and add to the `http::Response`'s `extensions`. Then,
when converting from `http::Response` to `async_impl::Response` we can
pull that value out of the `extensions` and use it to construct the
`async_impl::Response`
Closes#333
The mime crate is expecting a breaking change to 0.4, so to remove the
public dependency, this method is changed to `mime_str`, which will
parse a MIME string instead.
This means that `build` cannot possibly panic anymore due to being
called multiple times. This is a breaking change as it breaks the
behaviour of builder methods called without assigning to a new variable
or chaining. It's rather easy to fix those usages, as they won't
compile anymore and can be fixed by assigning a result.
Additionally, this change reduces the size of `RequestBuilder`,
although this likely isn't all that meaningful, as usually there
is no reason to store builders in structures.
- Bumps `native-tls` dependency to 0.2 and adapt code accordingly
- Import code used from `tokio-tls` into `connect_async` and adapt dependencies accordinlgy
- Add an option for using `danger_accept_invalid_certs` inside the `Config` struct