Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,11 @@ impl Response {
// })
// }

/// Take the request body, replacing it with an empty body.
pub fn take_body(&mut self) -> Body {
self.res.take_body()
}

/// Add cookie to the cookie jar.
pub fn set_cookie(&mut self, cookie: Cookie<'static>) {
self.cookie_events.push(CookieEvent::Added(cookie));
Expand Down