More tests
This commit is contained in:
@@ -8,7 +8,7 @@ extern crate env_logger;
|
||||
|
||||
use h2::client;
|
||||
|
||||
use http::request;
|
||||
use http::*;
|
||||
|
||||
use futures::*;
|
||||
|
||||
@@ -34,11 +34,19 @@ pub fn main() {
|
||||
println!("sending request");
|
||||
|
||||
let mut request = request::Head::default();
|
||||
request.method = method::POST;
|
||||
request.uri = "https://http2.akamai.com/".parse().unwrap();
|
||||
// request.version = version::H2;
|
||||
|
||||
conn.send_request(1.into(), request, true)
|
||||
})
|
||||
/*
|
||||
.then(|res| {
|
||||
let conn = res.unwrap();
|
||||
|
||||
conn.send_data(1.into(), "hello".into(), true)
|
||||
})
|
||||
*/
|
||||
.then(|res| {
|
||||
let conn = res.unwrap();
|
||||
// Get the next message
|
||||
|
||||
@@ -38,6 +38,12 @@ pub fn main() {
|
||||
|
||||
// Receive a request
|
||||
conn.into_future()
|
||||
.then(|res| {
|
||||
let (frame, conn) = res.unwrap();
|
||||
println!("Zomg frame; {:?}", frame);
|
||||
|
||||
conn.into_future()
|
||||
})
|
||||
.then(|res| {
|
||||
let (frame, conn) = res.unwrap();
|
||||
println!("Zomg frame; {:?}", frame);
|
||||
@@ -47,12 +53,6 @@ pub fn main() {
|
||||
|
||||
conn.send_response(1.into(), response, false)
|
||||
})
|
||||
.then(|res| {
|
||||
let conn = res.unwrap();
|
||||
println!("... sending data frame");
|
||||
|
||||
conn.send_data(1.into(), "hello".into(), false)
|
||||
})
|
||||
.then(|res| {
|
||||
let conn = res.unwrap();
|
||||
println!("... sending next frame");
|
||||
|
||||
Reference in New Issue
Block a user