diff options
| author | DankDumpster <[email protected]> | 2021-01-15 04:17:43 +0100 |
|---|---|---|
| committer | DankDumpster <[email protected]> | 2021-01-15 04:17:43 +0100 |
| commit | e4425e092962588823839011c92b4894fa963a07 (patch) | |
| tree | eed4e007522e136846e148e21b0697dc6e36c135 /src/bridge/reqwest.rs | |
| parent | update documentation (diff) | |
| download | oauth-reqwest-support.tar.xz oauth-reqwest-support.zip | |
added preludereqwest-support
Diffstat (limited to 'src/bridge/reqwest.rs')
| -rw-r--r-- | src/bridge/reqwest.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/bridge/reqwest.rs b/src/bridge/reqwest.rs index 971d594..fc313b6 100644 --- a/src/bridge/reqwest.rs +++ b/src/bridge/reqwest.rs @@ -18,17 +18,14 @@ use serde_urlencoded; /// the instance of hyper's Client will have those methods available: /// /// ```rust,no_run -/// extern crate hyper; -/// extern crate serenity_oauth; -/// /// # fn main() { -/// use hyper::Client; +/// use reqwest::blocking::Client; /// /// let client = Client::new(); /// /// // At this point, the methods defined by the trait are not in scope. By /// // using the trait, they will be. -/// use serenity_oauth::DiscordOAuthHyperRequester; +/// use serenity_oauth::DiscordOAuthReqwestRequester; /// /// // The methods defined by `DiscordOAuthHyperRequester` are now in scope and /// // implemented on the instance of hyper's `Client`. @@ -112,7 +109,7 @@ impl DiscordOAuthReqwestRequester for ReqwestClient { fn exchange_code(&self, request: &AccessTokenExchangeRequest) -> Result<AccessTokenResponse> { let body = serde_urlencoded::to_string(request)?; - let response = sel + let response = self .post(BASE_TOKEN_URI) .header(CONTENT_TYPE, "application/x-www-form-urlencoded") .body(body) |