The `RawStatus` types on the `Response` are now gone by default. To make
use of them, the `raw_status` feature must be enabled in `Cargo.toml`.
BREAKING CHANGE: To use `RawStatus`, you must enable the `raw_status`
crate feature.
This commit updates to the most recent versions (released today) of the various
Tokio libraries in use. Namely the `tokio_core::io` module has now been
deprecated in favor of an external `tokio-io` crate. This commit pulls in that
crate and uses the `AsyncRead + AsyncWrite` abstraction instead of `Io` from
tokio-core.
BREAKING CHANGE: Any external types that were using that had implemented `Io` will need to
implement `AsyncRead + AsyncWrite` from tokio_io.
This removes the cookie crate, since it has an optional dependency on
openssl, which can cause massive breakage if toggled on. Instead, the
`Cookie` and `SetCookie` headers now just use a `String`. Anyone can
create any typed header, so it is easy to plug in different
implementations.
BREAKING CHANGE: The `Cookie` and `SetCookie` headers no longer use the
cookie crate. New headers can be written for any header, or the ones
provided in hyper can be accessed as strings.
There are many changes involved with this, but let's just talk about
user-facing changes.
- Creating a `Client` and `Server` now needs a Tokio `Core` event loop
to attach to.
- `Request` and `Response` both no longer implement the
`std::io::{Read,Write}` traits, but instead represent their bodies as a
`futures::Stream` of items, where each item is a `Chunk`.
- The `Client.request` method now takes a `Request`, instead of being
used as a builder, and returns a `Future` that resolves to `Response`.
- The `Handler` trait for servers is no more, and instead the Tokio
`Service` trait is used. This allows interoperability with generic
middleware.
BREAKING CHANGE: A big sweeping set of breaking changes.
Methods added to `Client` and `Server` to control read and write
timeouts of the underlying socket.
Keep-Alive is re-enabled by default on the server, with a default
timeout of 5 seconds.
BREAKING CHANGE: This adds 2 required methods to the `NetworkStream`
trait, `set_read_timeout` and `set_write_timeout`. Any local
implementations will need to add them.