diff --git a/src/client/mod.rs b/src/client/mod.rs index 814a2d2..9038f65 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -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; diff --git a/src/lib.rs b/src/lib.rs index b464615..09f20e0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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::>::into(&token)) -//! .build(); -//! # } -//! ``` -//! //! ### Persisting tokens //! //! All token types implement `Serialize` and `Deserialize` from `serde`. diff --git a/tests/auth_uri.rs b/tests/auth_uri.rs index d97806f..2ae7b5c 100644 --- a/tests/auth_uri.rs +++ b/tests/auth_uri.rs @@ -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]