Merge pull request #1144 from Twey/master
client(feat): add an accessor for the request body
This commit is contained in:
@@ -46,6 +46,10 @@ impl<B> Request<B> {
|
|||||||
#[inline]
|
#[inline]
|
||||||
pub fn method(&self) -> &Method { &self.method }
|
pub fn method(&self) -> &Method { &self.method }
|
||||||
|
|
||||||
|
/// Read the Request body.
|
||||||
|
#[inline]
|
||||||
|
pub fn body(&self) -> Option<&B> { self.body.as_ref() }
|
||||||
|
|
||||||
/// Set the Method of this request.
|
/// Set the Method of this request.
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn set_method(&mut self, method: Method) { self.method = method; }
|
pub fn set_method(&mut self, method: Method) { self.method = method; }
|
||||||
|
|||||||
Reference in New Issue
Block a user