pub struct DefaultRequestBuilder<'req, B>(/* private fields */)
where
B: RequestBody;Trait Implementations§
Source§impl<'req, B> RequestBuilder<'req, B> for DefaultRequestBuilder<'req, B>where
B: RequestBody,
impl<'req, B> RequestBuilder<'req, B> for DefaultRequestBuilder<'req, B>where
B: RequestBody,
type WithBody<T: RequestBody> = DefaultRequestBuilder<'req, T>
Source§fn headers(self, headers: &'req [(&'req str, &'req str)]) -> Self
fn headers(self, headers: &'req [(&'req str, &'req str)]) -> Self
Set optional headers on the request.
Source§fn body<T: RequestBody>(self, body: T) -> Self::WithBody<T>
fn body<T: RequestBody>(self, body: T) -> Self::WithBody<T>
Set the data to send in the HTTP request body.
Source§fn content_type(self, content_type: ContentType) -> Self
fn content_type(self, content_type: ContentType) -> Self
Set the content type header for the request.
Source§fn accept(self, content_type: ContentType) -> Self
fn accept(self, content_type: ContentType) -> Self
Set the accept header for the request.
Source§fn basic_auth(self, username: &'req str, password: &'req str) -> Self
fn basic_auth(self, username: &'req str, password: &'req str) -> Self
Set the basic authentication header for the request.
Auto Trait Implementations§
impl<'req, B> Freeze for DefaultRequestBuilder<'req, B>where
B: Freeze,
impl<'req, B> RefUnwindSafe for DefaultRequestBuilder<'req, B>where
B: RefUnwindSafe,
impl<'req, B> Send for DefaultRequestBuilder<'req, B>where
B: Send,
impl<'req, B> Sync for DefaultRequestBuilder<'req, B>where
B: Sync,
impl<'req, B> Unpin for DefaultRequestBuilder<'req, B>where
B: Unpin,
impl<'req, B> UnwindSafe for DefaultRequestBuilder<'req, B>where
B: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more