You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pub(crate)asyncfnget<T>(&self,endpoint:&str,params:&HashMap<&str,&str>) -> Result<T>whereT:DeserializeOwned,{let header_bearer = format!("Bearer {}", self.bearer.access_token);letmut headers = HeaderMap::new();
headers.insert(AUTHORIZATION, header_bearer.parse()?);let text = self.client.get(endpoint).query(¶ms).headers(headers).send().await?
.text().await?;let result = serde_json::from_str(&text)?;Ok(result)}
This method sets query params in the URL.
The OAuth1.1 needs query params to calculate the OAuth signature and set it in the request header. It's too boring to calculate with each request, so this method provides easy ways for developers to implement a custom API method.
The kuon::TwitterAPI::post method is the same.
The text was updated successfully, but these errors were encountered:
kuon::TwitterAPI::get is below
This method sets query params in the URL.
The OAuth1.1 needs query params to calculate the OAuth signature and set it in the request header. It's too boring to calculate with each request, so this method provides easy ways for developers to implement a custom API method.
The kuon::TwitterAPI::post method is the same.
The text was updated successfully, but these errors were encountered: