Actually get server working (maybe)
This commit is contained in:
@@ -36,7 +36,7 @@ pub fn main() {
|
||||
.uri("https://http2.akamai.com/")
|
||||
.body(()).unwrap();
|
||||
|
||||
let stream = client.request(request, true);
|
||||
let stream = client.request(request, true).unwrap();
|
||||
client.join(stream.and_then(|response| {
|
||||
println!("GOT RESPONSE: {:?}", response);
|
||||
Ok(())
|
||||
|
||||
@@ -35,8 +35,15 @@ pub fn main() {
|
||||
|
||||
println!("H2 connection bound");
|
||||
|
||||
conn.for_each(|(request, stream)| {
|
||||
conn.for_each(|(request, mut stream)| {
|
||||
println!("GOT request: {:?}", request);
|
||||
|
||||
let response = Response::builder()
|
||||
.status(status::OK)
|
||||
.body(()).unwrap();
|
||||
|
||||
stream.send_response(response, true).unwrap();
|
||||
|
||||
Ok(())
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user