swim_core/
http.rs

1const SERVER_HEADER: &str = concat!("swim/", env!("CARGO_PKG_VERSION"));
2
3/// A type alias for a `hyper` request body.
4pub type Body = hyper::Body;
5
6/// A type alias for a `hyper` status code.
7pub type StatusCode = hyper::StatusCode;
8
9/// A type alias for a `hyper` request.
10pub type Request<T> = hyper::Request<T>;
11
12/// A type alias for a `hyper` response.
13pub type Response<T> = hyper::Response<T>;
14
15pub fn apply_server_specific_headers<T>(response: &mut hyper::Response<T>) {
16    response
17        .headers_mut()
18        .insert("Server", SERVER_HEADER.parse().unwrap());
19}