volo_http/utils/consts.rs
1//! Constants of HTTP(S) protocol.
2
3use http::header::HeaderValue;
4
5/// Default port of HTTP server.
6pub const HTTP_DEFAULT_PORT: u16 = 80;
7/// Default port of HTTPS server.
8pub const HTTPS_DEFAULT_PORT: u16 = 443;
9
10/// `application/json`
11pub const APPLICATION_JSON: HeaderValue = HeaderValue::from_static("application/json");
12/// `application/x-www-form-urlencoded`
13pub const APPLICATION_WWW_FORM_URLENCODED: HeaderValue =
14 HeaderValue::from_static("application/x-www-form-urlencoded");