Commit Graph

8 Commits

Author SHA1 Message Date
Sean McArthur
8c83a3358e feat(client): add a new Client struct with super powers
- 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.)
2014-12-14 11:56:39 -08:00
Sean McArthur
3ac277b1f0 fix(ssl): set_hostname on ssl connections 2014-12-11 20:27:37 -08:00
Sean McArthur
36429ab50c refactor(net): NetworkConnecter no longer is for static usage
Instead, you can use an instance of a NetworkConnector with
`Request::with_connector`. This allows overloading of the NetworkStream
constructors, so that it is easy to modify how an `HttpStream` is
created, while still relying on the rest of the stream implementation.

BREAKING CHANGE
2014-12-04 17:39:38 -08:00
Sean McArthur
a60a67cd1e feat(server): properly handle requests that shouldn't have bodies 2014-11-24 21:27:59 -08:00
Sean McArthur
3b8c5cac1a fix(client): GET and HEAD shouldn't add Transfer-Encoding
Also adds an EmptyWriter, used for GET and HEAD requests,
which will return an io::ShortWrite error if the user ever tries
to write to a GET or HEAD request.

Closes #77
2014-11-09 20:56:59 -08:00
Sean McArthur
3d7820d17e update using ToSocketAddr 2014-11-06 17:55:32 -08:00
Sean McArthur
3cd7d72b07 split NetworkStream::connect to NetworkConnector 2014-10-31 15:49:26 -07:00
Sean McArthur
0ab52c9009 add bits to deal with Upgrade requests 2014-10-27 20:36:57 -07:00