[−][src]Function oauth_client_async::post
pub fn post(
uri: &str,
consumer: &Token,
token: Option<&Token>,
other_param: Option<&ParamList>
) -> impl Future<Item = Vec<u8>, Error = Error>
Send authorized POST request to the specified URL.
consumer
is a consumer token.
Examples
let consumer = oauth_client::Token::new("key", "secret"); let ACCESS_TOKEN: &'static str = "http://oauthbin.com/v1/access-token"; let bytes_future = oauth_client::post(ACCESS_TOKEN, &consumer, Some(&request), None); let bytes = core.run(bytes_future).unwrap(); let resp = String::from_utf8(bytes).unwrap();