Track HTTP crate
This commit is contained in:
@@ -30,7 +30,7 @@ fn send_data_without_requesting_capacity() {
|
||||
.wait().unwrap();
|
||||
|
||||
let request = Request::builder()
|
||||
.method(method::POST)
|
||||
.method(Method::POST)
|
||||
.uri("https://http2.akamai.com/")
|
||||
.body(()).unwrap();
|
||||
|
||||
@@ -44,7 +44,7 @@ fn send_data_without_requesting_capacity() {
|
||||
|
||||
// Get the response
|
||||
let resp = h2.run(poll_fn(|| stream.poll_response())).unwrap();
|
||||
assert_eq!(resp.status(), status::NO_CONTENT);
|
||||
assert_eq!(resp.status(), StatusCode::NO_CONTENT);
|
||||
|
||||
h2.wait().unwrap();
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ fn single_stream_send_large_body() {
|
||||
.wait().unwrap();
|
||||
|
||||
let request = Request::builder()
|
||||
.method(method::POST)
|
||||
.method(Method::POST)
|
||||
.uri("https://http2.akamai.com/")
|
||||
.body(()).unwrap();
|
||||
|
||||
@@ -45,7 +45,7 @@ fn single_stream_send_large_body() {
|
||||
|
||||
// Get the response
|
||||
let resp = h2.run(poll_fn(|| stream.poll_response())).unwrap();
|
||||
assert_eq!(resp.status(), status::NO_CONTENT);
|
||||
assert_eq!(resp.status(), StatusCode::NO_CONTENT);
|
||||
|
||||
h2.wait().unwrap();
|
||||
}
|
||||
@@ -82,7 +82,7 @@ fn single_stream_send_extra_large_body_multi_frames_one_buffer() {
|
||||
.wait().unwrap();
|
||||
|
||||
let request = Request::builder()
|
||||
.method(method::POST)
|
||||
.method(Method::POST)
|
||||
.uri("https://http2.akamai.com/")
|
||||
.body(()).unwrap();
|
||||
|
||||
@@ -98,7 +98,7 @@ fn single_stream_send_extra_large_body_multi_frames_one_buffer() {
|
||||
|
||||
// Get the response
|
||||
let resp = h2.run(poll_fn(|| stream.poll_response())).unwrap();
|
||||
assert_eq!(resp.status(), status::NO_CONTENT);
|
||||
assert_eq!(resp.status(), StatusCode::NO_CONTENT);
|
||||
|
||||
h2.wait().unwrap();
|
||||
}
|
||||
@@ -147,7 +147,7 @@ fn single_stream_send_extra_large_body_multi_frames_multi_buffer() {
|
||||
.wait().unwrap();
|
||||
|
||||
let request = Request::builder()
|
||||
.method(method::POST)
|
||||
.method(Method::POST)
|
||||
.uri("https://http2.akamai.com/")
|
||||
.body(()).unwrap();
|
||||
|
||||
@@ -164,7 +164,7 @@ fn single_stream_send_extra_large_body_multi_frames_multi_buffer() {
|
||||
// Get the response
|
||||
let resp = h2.run(poll_fn(|| stream.poll_response())).unwrap();
|
||||
|
||||
assert_eq!(resp.status(), status::NO_CONTENT);
|
||||
assert_eq!(resp.status(), StatusCode::NO_CONTENT);
|
||||
|
||||
h2.wait().unwrap();
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ fn send_recv_headers_only() {
|
||||
let mut stream = h2.request(request, true).unwrap();
|
||||
|
||||
let resp = h2.run(poll_fn(|| stream.poll_response())).unwrap();
|
||||
assert_eq!(resp.status(), status::NO_CONTENT);
|
||||
assert_eq!(resp.status(), StatusCode::NO_CONTENT);
|
||||
|
||||
h2.wait().unwrap();
|
||||
}
|
||||
@@ -66,7 +66,7 @@ fn send_recv_data() {
|
||||
.wait().unwrap();
|
||||
|
||||
let request = Request::builder()
|
||||
.method(method::POST)
|
||||
.method(Method::POST)
|
||||
.uri("https://http2.akamai.com/")
|
||||
.body(()).unwrap();
|
||||
|
||||
@@ -83,7 +83,7 @@ fn send_recv_data() {
|
||||
|
||||
// Get the response
|
||||
let resp = h2.run(poll_fn(|| stream.poll_response())).unwrap();
|
||||
assert_eq!(resp.status(), status::OK);
|
||||
assert_eq!(resp.status(), StatusCode::OK);
|
||||
|
||||
// Take the body
|
||||
let (_, body) = resp.into_parts();
|
||||
@@ -131,7 +131,7 @@ fn send_headers_recv_data_single_frame() {
|
||||
let mut stream = h2.request(request, true).unwrap();
|
||||
|
||||
let resp = h2.run(poll_fn(|| stream.poll_response())).unwrap();
|
||||
assert_eq!(resp.status(), status::OK);
|
||||
assert_eq!(resp.status(), StatusCode::OK);
|
||||
|
||||
// Take the body
|
||||
let (_, body) = resp.into_parts();
|
||||
@@ -169,7 +169,7 @@ fn send_data_after_headers_eos() {
|
||||
|
||||
// Send the request
|
||||
let mut request = request::Head::default();
|
||||
request.method = method::POST;
|
||||
request.method = Method::POST;
|
||||
request.uri = "https://http2.akamai.com/".parse().unwrap();
|
||||
|
||||
let id = 1.into();
|
||||
|
||||
@@ -7,7 +7,7 @@ authors = ["Carl Lerche <me@carllerche.com>"]
|
||||
futures = "0.1"
|
||||
tokio-io = "0.1"
|
||||
bytes = "0.4"
|
||||
http = { git = "https://github.com/carllerche/http", rev = "2dd15d9" }
|
||||
http = { git = "https://github.com/carllerche/http" }
|
||||
env_logger = "0.4"
|
||||
|
||||
mock-io = { git = "https://github.com/carllerche/mock-io", branch = "experiments" }
|
||||
|
||||
@@ -21,11 +21,11 @@ pub use self::futures::future::poll_fn;
|
||||
pub use self::http::{
|
||||
request,
|
||||
response,
|
||||
method,
|
||||
status,
|
||||
Request,
|
||||
Response,
|
||||
Method,
|
||||
HeaderMap,
|
||||
StatusCode,
|
||||
};
|
||||
|
||||
pub use self::h2::*;
|
||||
|
||||
@@ -35,7 +35,7 @@ fn recv_trailers_only() {
|
||||
let mut stream = h2.request(request, true).unwrap();
|
||||
|
||||
let response = h2.run(poll_fn(|| stream.poll_response())).unwrap();
|
||||
assert_eq!(response.status(), status::OK);
|
||||
assert_eq!(response.status(), StatusCode::OK);
|
||||
|
||||
let (_, mut body) = response.into_parts();
|
||||
|
||||
@@ -88,7 +88,7 @@ fn send_trailers_immediately() {
|
||||
stream.send_trailers(trailers).unwrap();
|
||||
|
||||
let response = h2.run(poll_fn(|| stream.poll_response())).unwrap();
|
||||
assert_eq!(response.status(), status::OK);
|
||||
assert_eq!(response.status(), StatusCode::OK);
|
||||
|
||||
let (_, mut body) = response.into_parts();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user