mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-29 08:09:18 +02:00
add expect: 100-continue support #141
This commit is contained in:
@@ -51,6 +51,18 @@ impl Response<Body> {
|
||||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub(crate) fn empty(status: StatusCode) -> Response<()> {
|
||||
let mut head: Message<ResponseHead> = Message::new();
|
||||
head.status = status;
|
||||
|
||||
Response {
|
||||
head,
|
||||
body: ResponseBody::Body(()),
|
||||
error: None,
|
||||
}
|
||||
}
|
||||
|
||||
/// Constructs an error response
|
||||
#[inline]
|
||||
pub fn from_error(error: Error) -> Response {
|
||||
|
Reference in New Issue
Block a user