pub trait RequestClient {
type Body: From<String> + From<Vec<u8, Global>> + From<&'static [u8]> + From<&'static str>;
type Form;
Show 27 methods
fn token(&self) -> String;
fn set_token(&self, token: &str);
fn ident(&self) -> ResourceIdentity;
fn set_ident(&self, ident: ResourceIdentity);
fn url(&self) -> GraphUrl;
fn to_url(&self) -> Url;
fn set_url(&self, url: GraphUrl);
fn method(&self) -> Method;
fn set_method(&self, method: Method);
fn set_body<T>(&self, body: T)
where
T: Into<Self::Body>;
fn set_body_with_file(&self, path: PathBuf) -> Result<(), GraphFailure>;
fn header<T>(&self, name: T, value: HeaderValue)
where
T: IntoHeaderName;
fn set_header_map(&self, header_map: HeaderMap<HeaderValue>);
fn clear_headers(&self);
fn set_download_dir(&self, dir: PathBuf);
fn set_upload_session(&self, file: PathBuf);
fn set_form(&self, form: Self::Form);
fn set_request_type(&self, req_type: RequestType);
fn request_type(&self) -> RequestType;
fn url_ref<F>(&self, f: F)
where
F: Fn(&GraphUrl) + Sync;
fn url_mut<F>(&self, f: F)
where
F: Fn(&mut GraphUrl) + Sync;
fn registry<F>(&self, f: F)
where
F: Fn(&mut Registry) + Sync;
fn render_template(&self, template: &str, json: &Value) -> String;
fn register_ident_helper(&self, resource_identity: ResourceIdentity);
fn extend_path(&self, path: &[&str]);
fn set_request(
&self,
req_attr: Vec<RequestAttribute<Self::Body, Self::Form>, Global>
) -> Result<(), GraphFailure>;
fn set_body_with_serialize<B>(&self, body: &B) -> Result<(), GraphFailure>
where
B: Serialize,
{ ... }
}