From ccb3f61d70ba944ea100a14b9e61fdf8b2114369 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Mon, 23 Oct 2017 23:52:20 -0700 Subject: [PATCH] added response's helper method finish --- src/httpresponse.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/httpresponse.rs b/src/httpresponse.rs index dbb82ffe1..6dc7ab7d8 100644 --- a/src/httpresponse.rs +++ b/src/httpresponse.rs @@ -372,6 +372,11 @@ impl HttpResponseBuilder { error: None, }) } + + /// Set an empty body + pub fn finish(&mut self) -> Result { + self.body(Body::Empty) + } } fn parts<'a>(parts: &'a mut Option, err: &Option) -> Option<&'a mut Parts>