View Javadoc
1   /*
2    * Copyright 2014 The Netty Project
3    *
4    * The Netty Project licenses this file to you under the Apache License,
5    * version 2.0 (the "License"); you may not use this file except in compliance
6    * with the License. You may obtain a copy of the License at:
7    *
8    *   https://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12   * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13   * License for the specific language governing permissions and limitations
14   * under the License.
15   */
16  
17  package io.netty5.handler.codec.http;
18  
19  import io.netty5.util.AsciiString;
20  
21  /**
22   * Standard HTTP header values.
23   */
24  public final class HttpHeaderValues {
25      /**
26       * {@code "application/json"}
27       */
28      public static final AsciiString APPLICATION_JSON = AsciiString.cached("application/json");
29      /**
30       * {@code "application/x-www-form-urlencoded"}
31       */
32      public static final AsciiString APPLICATION_X_WWW_FORM_URLENCODED =
33              AsciiString.cached("application/x-www-form-urlencoded");
34      /**
35       * {@code "application/octet-stream"}
36       */
37      public static final AsciiString APPLICATION_OCTET_STREAM = AsciiString.cached("application/octet-stream");
38      /**
39       * {@code "application/xhtml+xml"}
40       */
41      public static final AsciiString APPLICATION_XHTML = AsciiString.cached("application/xhtml+xml");
42      /**
43       * {@code "application/xml"}
44       */
45      public static final AsciiString APPLICATION_XML = AsciiString.cached("application/xml");
46      /**
47       * {@code "application/zstd"}
48       */
49      public static final AsciiString APPLICATION_ZSTD = AsciiString.cached("application/zstd");
50      /**
51       * {@code "attachment"}
52       * See {@link HttpHeaderNames#CONTENT_DISPOSITION}
53       */
54      public static final AsciiString ATTACHMENT = AsciiString.cached("attachment");
55      /**
56       * {@code "base64"}
57       */
58      public static final AsciiString BASE64 = AsciiString.cached("base64");
59      /**
60       * {@code "binary"}
61       */
62      public static final AsciiString BINARY = AsciiString.cached("binary");
63      /**
64       * {@code "boundary"}
65       */
66      public static final AsciiString BOUNDARY = AsciiString.cached("boundary");
67      /**
68       * {@code "bytes"}
69       */
70      public static final AsciiString BYTES = AsciiString.cached("bytes");
71      /**
72       * {@code "charset"}
73       */
74      public static final AsciiString CHARSET = AsciiString.cached("charset");
75      /**
76       * {@code "chunked"}
77       */
78      public static final AsciiString CHUNKED = AsciiString.cached("chunked");
79      /**
80       * {@code "close"}
81       */
82      public static final AsciiString CLOSE = AsciiString.cached("close");
83      /**
84       * {@code "compress"}
85       */
86      public static final AsciiString COMPRESS = AsciiString.cached("compress");
87      /**
88       * {@code "100-continue"}
89       */
90      public static final AsciiString CONTINUE = AsciiString.cached("100-continue");
91      /**
92       * {@code "deflate"}
93       */
94      public static final AsciiString DEFLATE = AsciiString.cached("deflate");
95      /**
96       * {@code "x-deflate"}
97       */
98      public static final AsciiString X_DEFLATE = AsciiString.cached("x-deflate");
99      /**
100      * {@code "file"}
101      * See {@link HttpHeaderNames#CONTENT_DISPOSITION}
102      */
103     public static final AsciiString FILE = AsciiString.cached("file");
104     /**
105      * {@code "filename"}
106      * See {@link HttpHeaderNames#CONTENT_DISPOSITION}
107      */
108     public static final AsciiString FILENAME = AsciiString.cached("filename");
109     /**
110      * {@code "form-data"}
111      * See {@link HttpHeaderNames#CONTENT_DISPOSITION}
112      */
113     public static final AsciiString FORM_DATA = AsciiString.cached("form-data");
114     /**
115      * {@code "gzip"}
116      */
117     public static final AsciiString GZIP = AsciiString.cached("gzip");
118     /**
119      * {@code "br"}
120      */
121     public static final AsciiString BR = AsciiString.cached("br");
122     /**
123      * {@code "zstd"}
124      */
125     public static final AsciiString ZSTD = AsciiString.cached("zstd");
126     /**
127      * {@code "gzip,deflate"}
128      */
129     public static final AsciiString GZIP_DEFLATE = AsciiString.cached("gzip,deflate");
130     /**
131      * {@code "x-gzip"}
132      */
133     public static final AsciiString X_GZIP = AsciiString.cached("x-gzip");
134     /**
135      * {@code "identity"}
136      */
137     public static final AsciiString IDENTITY = AsciiString.cached("identity");
138     /**
139      * {@code "keep-alive"}
140      */
141     public static final AsciiString KEEP_ALIVE = AsciiString.cached("keep-alive");
142     /**
143      * {@code "max-age"}
144      */
145     public static final AsciiString MAX_AGE = AsciiString.cached("max-age");
146     /**
147      * {@code "max-stale"}
148      */
149     public static final AsciiString MAX_STALE = AsciiString.cached("max-stale");
150     /**
151      * {@code "min-fresh"}
152      */
153     public static final AsciiString MIN_FRESH = AsciiString.cached("min-fresh");
154     /**
155      * {@code "multipart/form-data"}
156      */
157     public static final AsciiString MULTIPART_FORM_DATA = AsciiString.cached("multipart/form-data");
158     /**
159      * {@code "multipart/mixed"}
160      */
161     public static final AsciiString MULTIPART_MIXED = AsciiString.cached("multipart/mixed");
162     /**
163      * {@code "must-revalidate"}
164      */
165     public static final AsciiString MUST_REVALIDATE = AsciiString.cached("must-revalidate");
166     /**
167      * {@code "name"}
168      * See {@link HttpHeaderNames#CONTENT_DISPOSITION}
169      */
170     public static final AsciiString NAME = AsciiString.cached("name");
171     /**
172      * {@code "no-cache"}
173      */
174     public static final AsciiString NO_CACHE = AsciiString.cached("no-cache");
175     /**
176      * {@code "no-store"}
177      */
178     public static final AsciiString NO_STORE = AsciiString.cached("no-store");
179     /**
180      * {@code "no-transform"}
181      */
182     public static final AsciiString NO_TRANSFORM = AsciiString.cached("no-transform");
183     /**
184      * {@code "none"}
185      */
186     public static final AsciiString NONE = AsciiString.cached("none");
187     /**
188      * {@code "0"}
189      */
190     public static final AsciiString ZERO = AsciiString.cached("0");
191     /**
192      * {@code "only-if-cached"}
193      */
194     public static final AsciiString ONLY_IF_CACHED = AsciiString.cached("only-if-cached");
195     /**
196      * {@code "private"}
197      */
198     public static final AsciiString PRIVATE = AsciiString.cached("private");
199     /**
200      * {@code "proxy-revalidate"}
201      */
202     public static final AsciiString PROXY_REVALIDATE = AsciiString.cached("proxy-revalidate");
203     /**
204      * {@code "public"}
205      */
206     public static final AsciiString PUBLIC = AsciiString.cached("public");
207     /**
208      * {@code "quoted-printable"}
209      */
210     public static final AsciiString QUOTED_PRINTABLE = AsciiString.cached("quoted-printable");
211     /**
212      * {@code "s-maxage"}
213      */
214     public static final AsciiString S_MAXAGE = AsciiString.cached("s-maxage");
215     /**
216      * {@code "text/css"}
217      */
218     public static final AsciiString TEXT_CSS = AsciiString.cached("text/css");
219     /**
220      * {@code "text/html"}
221      */
222     public static final AsciiString TEXT_HTML = AsciiString.cached("text/html");
223     /**
224      * {@code "text/event-stream"}
225      */
226     public static final AsciiString TEXT_EVENT_STREAM = AsciiString.cached("text/event-stream");
227     /**
228      * {@code "text/plain"}
229      */
230     public static final AsciiString TEXT_PLAIN = AsciiString.cached("text/plain");
231     /**
232      * {@code "trailers"}
233      */
234     public static final AsciiString TRAILERS = AsciiString.cached("trailers");
235     /**
236      * {@code "upgrade"}
237      */
238     public static final AsciiString UPGRADE = AsciiString.cached("upgrade");
239     /**
240      * {@code "websocket"}
241      */
242     public static final AsciiString WEBSOCKET = AsciiString.cached("websocket");
243     /**
244      * {@code "XmlHttpRequest"}
245      */
246     public static final AsciiString XML_HTTP_REQUEST = AsciiString.cached("XMLHttpRequest");
247 
248     private HttpHeaderValues() { }
249 }