Use the crates.io version of reqwest (#247)

This allows us to publish `juniper_hyper`
This commit is contained in:
Christian Legnitto 2018-09-13 10:06:03 -07:00 committed by GitHub
parent e82abede94
commit be4c352939
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 12 deletions

View file

@ -21,7 +21,7 @@ hyper = "0.12"
[dev-dependencies]
pretty_env_logger = "0.2"
tokio = "0.1.8"
reqwest = { git = "https://github.com/seanmonstar/reqwest" }
reqwest = "0.8"
[dev-dependencies.juniper]
version = "0.10.0"

View file

@ -1,5 +1,3 @@
#![feature(extern_prelude)]
extern crate futures;
extern crate futures_cpupool;
extern crate hyper;
@ -283,7 +281,7 @@ mod tests {
use futures_cpupool::Builder;
use hyper::service::service_fn;
use hyper::Method;
use hyper::{header, Body, Response, Server, StatusCode};
use hyper::{Body, Response, Server, StatusCode};
use juniper::http::tests as http_tests;
use juniper::tests::model::Database;
use juniper::EmptyMutation;
@ -317,15 +315,15 @@ mod tests {
fn make_test_response(mut response: ReqwestResponse) -> http_tests::TestResponse {
let status_code = response.status().as_u16() as i32;
let content_type = String::from_utf8(
response
.headers()
.get(header::CONTENT_TYPE)
.map(|h| h.clone().as_ref().to_vec())
.unwrap_or(vec![]),
).expect("Content-type header invalid UTF-8");
let body = response.text().unwrap();
let content_type_header = response
.headers()
.get::<reqwest::header::ContentType>();
let content_type = if let Some(ct) = content_type_header {
format!("{}", ct)
} else {
String::default()
};
http_tests::TestResponse {
status_code,