Function oauth_client::post
source · [−]pub fn post<RB: RequestBuilder>(
uri: &str,
consumer: &Token<'_>,
token: Option<&Token<'_>>,
other_param: Option<&ParamList<'_>>,
client: &RB::ClientBuilder
) -> Result<RB::ReturnValue, Error>
Expand description
Send authorized POST request to the specified URL.
consumer
is a consumer token.
Examples
let request = oauth_client::Token::new("key", "secret");
let ACCESS_TOKEN: &'static str = "https://oauthbin.com/v1/access-token";
let consumer = oauth_client::Token::new("key", "secret");
let resp = oauth_client::post::<DefaultRequestBuilder>(ACCESS_TOKEN, &consumer, Some(&request), None, &()).unwrap();