feat(header): add Connection::close() and ::keep_alive() constructors
This commit is contained in:
@@ -8,7 +8,6 @@ use std::io;
|
||||
|
||||
use hyper::Client;
|
||||
use hyper::header::Connection;
|
||||
use hyper::header::ConnectionOption::Close;
|
||||
|
||||
fn main() {
|
||||
env_logger::init().unwrap();
|
||||
@@ -24,7 +23,7 @@ fn main() {
|
||||
let mut client = Client::new();
|
||||
|
||||
let mut res = client.get(&*url)
|
||||
.header(Connection(vec![Close]))
|
||||
.header(Connection::close())
|
||||
.send().unwrap();
|
||||
|
||||
println!("Response: {}", res.status);
|
||||
|
||||
Reference in New Issue
Block a user