Struct azure_core::Request
source · [−]pub struct Request { /* private fields */ }
Expand description
A pipeline request.
A pipeline request is composed by a destination (uri), a method, a collection of headers and a body. Policies are expected to enrich the request by mutating it.
Implementations
sourceimpl Request
impl Request
sourcepub fn new(url: Url, method: Method) -> Self
pub fn new(url: Url, method: Method) -> Self
Create a new request with an empty body and no headers
pub fn url(&self) -> &Url
pub fn url_mut(&mut self) -> &mut Url
pub fn path_and_query(&self) -> String
pub fn method(&self) -> &Method
pub fn insert_headers<T: AsHeaders>(&mut self, headers: &T)
pub fn headers(&self) -> &Headers
pub fn body(&self) -> &Body
pub fn set_body(&mut self, body: impl Into<Body>)
pub fn insert_header<K, V>(&mut self, key: K, value: V)where
K: Into<HeaderName>,
V: Into<HeaderValue>,
pub fn add_optional_header<T: Header>(&mut self, item: &Option<T>)
pub fn add_mandatory_header<T: Header>(&mut self, item: &T)
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl !UnwindSafe for Request
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more