fix cargo test

This commit is contained in:
edelangh 2018-10-15 23:21:57 +02:00
parent ff8b0aea71
commit 613c8e5d59
3 changed files with 2 additions and 23 deletions

View File

@ -6,7 +6,7 @@ pub mod response;
pub use self::error::ClientError;
use reqwest;
use reqwest::header::{ACCEPT, AUTHORIZATION, CONTENT_TYPE};
use reqwest::header::{ACCEPT, CONTENT_TYPE};
use serde_json::{self, Value};
use url::form_urlencoded::Serializer;
use url::Url;

View File

@ -103,27 +103,6 @@
//! # }
//! ```
//!
//! ### Using bearer access tokens
//!
//! Bearer tokens can be converted to Hyper headers.
//!
//! ```no_run
//! # extern crate inth_oauth2;
//! # extern crate reqwest;
//! # use inth_oauth2::Client;
//! # use inth_oauth2::provider::google::Installed;
//! use reqwest::header::Authorization;
//!
//! # fn main() {
//! # let oauth_client = Client::new(Installed, String::new(), String::new(), None);
//! # let http = reqwest::Client::new();
//! # let token = oauth_client.request_token(&http, "").unwrap();
//! let request = http.get("https://example.com/resource")
//! .header(Into::<Authorization<_>>::into(&token))
//! .build();
//! # }
//! ```
//!
//! ### Persisting tokens
//!
//! All token types implement `Serialize` and `Deserialize` from `serde`.

View File

@ -8,7 +8,7 @@ use url::Url;
fn assert_get_uri_ok(uri: Url) {
let response = reqwest::get(uri).unwrap();
assert_eq!(reqwest::StatusCode::Ok, response.status());
assert_eq!(reqwest::StatusCode::OK, response.status());
}
#[test]