mirror of https://github.com/http-rs/http-types
make mime public
Signed-off-by: Yoshua Wuyts <yoshuawuyts@gmail.com>
This commit is contained in:
parent
8eabbfec6e
commit
73f242a650
33
src/lib.rs
33
src/lib.rs
|
@ -21,38 +21,7 @@ pub mod url {
|
|||
}
|
||||
|
||||
pub mod headers;
|
||||
|
||||
/// IANA Media Types.
|
||||
///
|
||||
/// [Read more](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
|
||||
pub mod mime {
|
||||
/// Content-Type for JavaScript.
|
||||
pub const JAVASCRIPT: &'static str = "application/javascript; charset=utf-8";
|
||||
|
||||
/// Content-Type for JSON.
|
||||
pub const JSON: &'static str = "application/json";
|
||||
|
||||
/// Content-Type for CSS.
|
||||
pub const CSS: &'static str = "text/css; charset=utf-8";
|
||||
|
||||
/// Content-Type for HTML.
|
||||
pub const HTML: &'static str = "text/html; charset=utf-8";
|
||||
|
||||
/// Content-Type for Server Sent Events
|
||||
pub const SSE: &'static str = "text/event-stream;";
|
||||
|
||||
/// Content-Type for plain text.
|
||||
pub const PLAIN: &'static str = "text/plain; charset=utf-8";
|
||||
|
||||
/// Content-Type for byte streams.
|
||||
pub const BYTE_STREAM: &'static str = "application/octet-stream";
|
||||
|
||||
/// Content-Type for form.
|
||||
pub const FORM: &'static str = "application/x-www-urlencoded";
|
||||
|
||||
/// Content-Type for a multipart form.
|
||||
pub const MULTIPART_FORM: &'static str = "multipart/form-data";
|
||||
}
|
||||
pub mod mime;
|
||||
|
||||
/// Security headers.
|
||||
pub mod secure {
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
//! IANA Media Types.
|
||||
//!
|
||||
//! [Read more](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types).
|
||||
|
||||
/// Content-Type for JavaScript.
|
||||
pub const JAVASCRIPT: &'static str = "application/javascript; charset=utf-8";
|
||||
|
||||
/// Content-Type for JSON.
|
||||
pub const JSON: &'static str = "application/json";
|
||||
|
||||
/// Content-Type for CSS.
|
||||
pub const CSS: &'static str = "text/css; charset=utf-8";
|
||||
|
||||
/// Content-Type for HTML.
|
||||
pub const HTML: &'static str = "text/html; charset=utf-8";
|
||||
|
||||
/// Content-Type for Server Sent Events
|
||||
pub const SSE: &'static str = "text/event-stream;";
|
||||
|
||||
/// Content-Type for plain text.
|
||||
pub const PLAIN: &'static str = "text/plain; charset=utf-8";
|
||||
|
||||
/// Content-Type for byte streams.
|
||||
pub const BYTE_STREAM: &'static str = "application/octet-stream";
|
||||
|
||||
/// Content-Type for form.
|
||||
pub const FORM: &'static str = "application/x-www-urlencoded";
|
||||
|
||||
/// Content-Type for a multipart form.
|
||||
pub const MULTIPART_FORM: &'static str = "multipart/form-data";
|
Loading…
Reference in New Issue