feat(client): adds HttpInfo to responses when HttpConnector is used

- Adds `client::connect::Connected::extra()`, which allows connectors to
  specify arbitrary custom information about a connected transport.

If a connector provides this extra value, it will be set in the
`Response` extensions.

Closes #1402
This commit is contained in:
Sean McArthur
2018-10-16 13:19:48 -07:00
parent d55b5efb89
commit 13d53e1d0c
5 changed files with 145 additions and 13 deletions

View File

@@ -10,7 +10,6 @@ static PHRASE: &'static [u8] = b"Hello World!";
fn main() {
pretty_env_logger::init();
let addr = ([127, 0, 0, 1], 3000).into();
// new_service is run for each connection, creating a 'service'