use crate::Body;
pub fn not_found() -> http::Response<Body> {
http::Response::builder()
.status(http::StatusCode::NOT_FOUND)
.body(Body::empty())
.unwrap()
}
pub fn not_modified() -> http::Response<Body> {
http::Response::builder()
.status(http::StatusCode::NOT_MODIFIED)
.body(Body::empty())
.unwrap()
}
pub fn method_not_allowed() -> http::Response<Body> {
http::Response::builder()
.header(
http::header::ALLOW,
http::HeaderValue::from_static("GET, HEAD"),
)
.status(http::StatusCode::METHOD_NOT_ALLOWED)
.body(Body::empty())
.unwrap()
}
pub fn internal_server_error() -> http::Response<Body> {
http::Response::builder()
.status(http::StatusCode::INTERNAL_SERVER_ERROR)
.body(Body::empty())
.unwrap()
}