pub struct RequestSpec {
pub url: String,
pub headers: Vec<(String, String)>,
}Expand description
Describes a single HTTP request: target URL plus extra request headers.
Callers SHOULD always include a User-Agent header (many APIs — e.g. the
SEC EDGAR system — reject requests without one). See the crate examples.
Fields§
§url: StringAbsolute URL to GET.
headers: Vec<(String, String)>Additional request headers as (name, value) pairs.
Implementations§
Trait Implementations§
Source§impl Clone for RequestSpec
impl Clone for RequestSpec
Source§fn clone(&self) -> RequestSpec
fn clone(&self) -> RequestSpec
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RequestSpec
impl RefUnwindSafe for RequestSpec
impl Send for RequestSpec
impl Sync for RequestSpec
impl Unpin for RequestSpec
impl UnsafeUnpin for RequestSpec
impl UnwindSafe for RequestSpec
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