http_type/content_type/enum.rs
1use crate::*;
2
3/// Supported HTTP content types.
4///
5/// Defines common content types for HTTP communication.
6#[derive(Debug, Clone, Copy, PartialEq, Eq, Default, Serialize, Deserialize)]
7pub enum ContentType {
8 /// `application/json` content type.
9 ///
10 /// For JSON data format.
11 ApplicationJson,
12 /// `application/xml` content type.
13 ///
14 /// For XML data format.
15 ApplicationXml,
16 /// `text/plain` content type.
17 ///
18 /// For plain text data.
19 TextPlain,
20 /// `text/html` content type.
21 ///
22 /// For HTML documents.
23 TextHtml,
24 /// `application/x-www-form-urlencoded` content type.
25 ///
26 /// For form data submission.
27 FormUrlEncoded,
28 /// Unknown content type.
29 ///
30 /// For unrecognized content types.
31 #[default]
32 Unknown,
33}