Trait Authorization

Source
pub trait Authorization {
    // Required method
    fn auth_with(&mut self, token: &Token) -> Result<(), Error>;
}
Expand description

Helper trait for extending the builder-style pattern of curl::easy::Easy.

This trait allows chaining the correct authorization headers onto a curl request via the builder style.

Required Methods§

Source

fn auth_with(&mut self, token: &Token) -> Result<(), Error>

Implementations on Foreign Types§

Source§

impl Authorization for Easy

Given a curl::easy::Easy and a Token struct, it adds the Authorization: access_token header to the request. It return curl::Error when adding the header fails.

Source§

fn auth_with(&mut self, token: &Token) -> Result<(), Error>

Implementors§