Struct graph_http::GraphRequest
source ·
[−]pub struct GraphRequest<Client, Body, Form> {
pub url: GraphUrl,
pub method: Method,
pub body: Option<Body>,
pub headers: HeaderMap<HeaderValue>,
pub upload_session_file: Option<PathBuf>,
pub download_dir: Option<PathBuf>,
pub form: Option<Form>,
pub req_type: RequestType,
// some fields omitted
}
Fields
url: GraphUrl
method: Method
body: Option<Body>
headers: HeaderMap<HeaderValue>
upload_session_file: Option<PathBuf>
download_dir: Option<PathBuf>
form: Option<Form>
req_type: RequestType
Implementations
Builds the request and sends it.
Requests that require a redirect are automatic so we don’t need to do anything special for these requests.
pub async fn execute<T>(&mut self) -> GraphResult<GraphResponse<T>> where
for<'de> T: Deserialize<'de>,
pub async fn execute<T>(&mut self) -> GraphResult<GraphResponse<T>> where
for<'de> T: Deserialize<'de>,
Builds the requests and sends it, converting to a GraphResponse and deserializing the body.
Builds the request and sends it.
Requests that require a redirect are automatic so we don’t need to do anything special for these requests.
pub fn execute<T>(&mut self) -> GraphResult<GraphResponse<T>> where
for<'de> T: Deserialize<'de>,
pub fn execute<T>(&mut self) -> GraphResult<GraphResponse<T>> where
for<'de> T: Deserialize<'de>,
Builds the requests and sends it, converting to a GraphResponse and deserializing the body.
Trait Implementations
impl From<GraphRequest<Client, Body, Form>> for HttpClient<Arc<Mutex<GraphRequest<Client, Body, Form>>>>
impl From<GraphRequest<Client, Body, Form>> for HttpClient<Arc<Mutex<GraphRequest<Client, Body, Form>>>>
Performs the conversion.
Auto Trait Implementations
impl<Client, Body, Form> !RefUnwindSafe for GraphRequest<Client, Body, Form>
impl<Client, Body, Form> Send for GraphRequest<Client, Body, Form> where
Body: Send,
Client: Send,
Form: Send,
impl<Client, Body, Form> Sync for GraphRequest<Client, Body, Form> where
Body: Sync,
Client: Sync,
Form: Sync,
impl<Client, Body, Form> Unpin for GraphRequest<Client, Body, Form> where
Body: Unpin,
Client: Unpin,
Form: Unpin,
impl<Client, Body, Form> !UnwindSafe for GraphRequest<Client, Body, Form>
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more