From 3fa191a2676feb86c91abf8dfcc8e63477980297 Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Sat, 24 Feb 2018 12:16:25 -0800 Subject: [PATCH] feat(request): add `Request::body_mut()` method --- src/proto/request.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/proto/request.rs b/src/proto/request.rs index a344138c75..c989b9c5bc 100644 --- a/src/proto/request.rs +++ b/src/proto/request.rs @@ -58,6 +58,10 @@ impl Request { #[inline] pub fn body_ref(&self) -> Option<&B> { self.body.as_ref() } + /// Get a mutable reference to the Request body. + #[inline] + pub fn body_mut(&mut self) -> &mut Option { &mut self.body } + #[doc(hidden)] #[inline] #[deprecated(since="0.11.12", note="This method will be gone in future versions.")]