pub struct HttpRequest {
pub url: String,
pub headers: Vec<(String, String)>,
pub data: RequestData,
}
Expand description
The http request object. Used to pack grammarly request so that
it can be used to send requests from other request crates (reqwest
/hyper
/etc).
The main use case is when the library is built without the client
feature, so
you still can perform requests using your own implementation.
Fields§
§url: String
Request URL.
headers: Vec<(String, String)>
Key-value pairs of the request headers.
data: RequestData
Key-value pairs of the request data.
Implementations§
Trait Implementations§
Source§impl Clone for HttpRequest
impl Clone for HttpRequest
Source§fn clone(&self) -> HttpRequest
fn clone(&self) -> HttpRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HttpRequest
impl Debug for HttpRequest
Source§impl From<&Request> for HttpRequest
impl From<&Request> for HttpRequest
Source§fn from(r: &Request) -> HttpRequest
fn from(r: &Request) -> HttpRequest
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for HttpRequest
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnwindSafe for HttpRequest
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