[−][src]Struct oauth1_request::Request
A pair of an OAuth header and its corresponding query/form string.
Fields
The Authorization
header string for the request.
data: String
The URI with query string or the x-www-form-urlencoded string for the request.
Methods
impl Request
[src]
pub fn new<'a, SM: SignatureMethod>(
method: &str,
uri: impl Display,
consumer_key: &str,
consumer_secret: &str,
token_secret: impl Into<Option<&'a str>>,
signature_method: SM,
options: impl Into<Option<&'a Options<'a>>>,
params: Option<&BTreeSet<(impl Borrow<str>, impl Borrow<str>)>>
) -> Self
[src]
method: &str,
uri: impl Display,
consumer_key: &str,
consumer_secret: &str,
token_secret: impl Into<Option<&'a str>>,
signature_method: SM,
options: impl Into<Option<&'a Options<'a>>>,
params: Option<&BTreeSet<(impl Borrow<str>, impl Borrow<str>)>>
) -> Self
Use <Option<&BTreeSet<(impl Borrow<str>, impl Borrow<str>)>> as OAuth1Authorize>::authorize
instead
Convenience method for creating a Request
using Signer::new
.
Example
extern crate oauth1_request as oauth; let oauth::Request { authorization, data } = oauth::Request::new( "GET", "https://example.com/api/v1/get.json", "consumer_key", "consumer_secret", "token_secret", oauth::HmacSha1, &*oauth::Options::new().token("token"), Some(&[("key", "value")].iter().cloned().collect()), );
pub fn new_form<'a, SM: SignatureMethod>(
method: &str,
uri: impl Display,
consumer_key: &str,
consumer_secret: &str,
token_secret: impl Into<Option<&'a str>>,
signature_method: SM,
options: impl Into<Option<&'a Options<'a>>>,
params: Option<&BTreeSet<(impl Borrow<str>, impl Borrow<str>)>>
) -> Self
[src]
method: &str,
uri: impl Display,
consumer_key: &str,
consumer_secret: &str,
token_secret: impl Into<Option<&'a str>>,
signature_method: SM,
options: impl Into<Option<&'a Options<'a>>>,
params: Option<&BTreeSet<(impl Borrow<str>, impl Borrow<str>)>>
) -> Self
Use <Option<&BTreeSet<(impl Borrow<str>, impl Borrow<str>)>> as OAuth1Authorize>::authorize_form
instead
Convenience method for creating a Request
using Signer::new_form
.
Example
extern crate oauth1_request as oauth; let oauth::Request { authorization, data } = oauth::Request::new( "POST", "https://example.com/api/v1/post.json", "consumer_key", "consumer_secret", "token_secret", oauth::HmacSha1, &*oauth::Options::new().token("token"), Some(&[("key", "value")].iter().cloned().collect()), );
pub fn signer<'a, SM: SignatureMethod>(
method: &str,
uri: impl Display,
consumer_secret: &str,
token_secret: impl Into<Option<&'a str>>,
signature_method: SM
) -> Signer<SM, NotReady>
[src]
method: &str,
uri: impl Display,
consumer_secret: &str,
token_secret: impl Into<Option<&'a str>>,
signature_method: SM
) -> Signer<SM, NotReady>
Alias of Signer::with_signature_method
for convenience.
pub fn signer_form<'a, SM: SignatureMethod>(
method: &str,
uri: impl Display,
consumer_secret: &str,
token_secret: impl Into<Option<&'a str>>,
signature_method: SM
) -> Signer<SM, NotReady>
[src]
method: &str,
uri: impl Display,
consumer_secret: &str,
token_secret: impl Into<Option<&'a str>>,
signature_method: SM
) -> Signer<SM, NotReady>
Alias of Signer::form_with_signature_method
for convenience.
Trait Implementations
impl Clone for Request
[src]
fn clone(&self) -> Request
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<Request> for Request
[src]
impl Eq for Request
[src]
impl Debug for Request
[src]
impl Hash for Request
[src]
Auto Trait Implementations
impl Unpin for Request
impl Sync for Request
impl Send for Request
impl UnwindSafe for Request
impl RefUnwindSafe for Request
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,
fn vzip(self) -> V
impl<T> Same<T> for T
type Output = T
Should always be Self