查看本类的 API文档回源码主页即时通讯网 - 即时通讯开发者社区!
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.netty.handler.codec.http;
18  
19  import io.netty.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     /**
124      * {@code "snappy"}
125      */
126     public static final AsciiString SNAPPY = AsciiString.cached("snappy");
127 
128     /**
129      * {@code "zstd"}
130      */
131     public static final AsciiString ZSTD = AsciiString.cached("zstd");
132     /**
133      * {@code "gzip,deflate"}
134      */
135     public static final AsciiString GZIP_DEFLATE = AsciiString.cached("gzip,deflate");
136     /**
137      * {@code "x-gzip"}
138      */
139     public static final AsciiString X_GZIP = AsciiString.cached("x-gzip");
140     /**
141      * {@code "identity"}
142      */
143     public static final AsciiString IDENTITY = AsciiString.cached("identity");
144     /**
145      * {@code "keep-alive"}
146      */
147     public static final AsciiString KEEP_ALIVE = AsciiString.cached("keep-alive");
148     /**
149      * {@code "max-age"}
150      */
151     public static final AsciiString MAX_AGE = AsciiString.cached("max-age");
152     /**
153      * {@code "max-stale"}
154      */
155     public static final AsciiString MAX_STALE = AsciiString.cached("max-stale");
156     /**
157      * {@code "min-fresh"}
158      */
159     public static final AsciiString MIN_FRESH = AsciiString.cached("min-fresh");
160     /**
161      * {@code "multipart/form-data"}
162      */
163     public static final AsciiString MULTIPART_FORM_DATA = AsciiString.cached("multipart/form-data");
164     /**
165      * {@code "multipart/mixed"}
166      */
167     public static final AsciiString MULTIPART_MIXED = AsciiString.cached("multipart/mixed");
168     /**
169      * {@code "must-revalidate"}
170      */
171     public static final AsciiString MUST_REVALIDATE = AsciiString.cached("must-revalidate");
172     /**
173      * {@code "name"}
174      * See {@link HttpHeaderNames#CONTENT_DISPOSITION}
175      */
176     public static final AsciiString NAME = AsciiString.cached("name");
177     /**
178      * {@code "no-cache"}
179      */
180     public static final AsciiString NO_CACHE = AsciiString.cached("no-cache");
181     /**
182      * {@code "no-store"}
183      */
184     public static final AsciiString NO_STORE = AsciiString.cached("no-store");
185     /**
186      * {@code "no-transform"}
187      */
188     public static final AsciiString NO_TRANSFORM = AsciiString.cached("no-transform");
189     /**
190      * {@code "none"}
191      */
192     public static final AsciiString NONE = AsciiString.cached("none");
193     /**
194      * {@code "0"}
195      */
196     public static final AsciiString ZERO = AsciiString.cached("0");
197     /**
198      * {@code "only-if-cached"}
199      */
200     public static final AsciiString ONLY_IF_CACHED = AsciiString.cached("only-if-cached");
201     /**
202      * {@code "private"}
203      */
204     public static final AsciiString PRIVATE = AsciiString.cached("private");
205     /**
206      * {@code "proxy-revalidate"}
207      */
208     public static final AsciiString PROXY_REVALIDATE = AsciiString.cached("proxy-revalidate");
209     /**
210      * {@code "public"}
211      */
212     public static final AsciiString PUBLIC = AsciiString.cached("public");
213     /**
214      * {@code "quoted-printable"}
215      */
216     public static final AsciiString QUOTED_PRINTABLE = AsciiString.cached("quoted-printable");
217     /**
218      * {@code "s-maxage"}
219      */
220     public static final AsciiString S_MAXAGE = AsciiString.cached("s-maxage");
221     /**
222      * {@code "text/css"}
223      */
224     public static final AsciiString TEXT_CSS = AsciiString.cached("text/css");
225     /**
226      * {@code "text/html"}
227      */
228     public static final AsciiString TEXT_HTML = AsciiString.cached("text/html");
229     /**
230      * {@code "text/event-stream"}
231      */
232     public static final AsciiString TEXT_EVENT_STREAM = AsciiString.cached("text/event-stream");
233     /**
234      * {@code "text/plain"}
235      */
236     public static final AsciiString TEXT_PLAIN = AsciiString.cached("text/plain");
237     /**
238      * {@code "trailers"}
239      */
240     public static final AsciiString TRAILERS = AsciiString.cached("trailers");
241     /**
242      * {@code "upgrade"}
243      */
244     public static final AsciiString UPGRADE = AsciiString.cached("upgrade");
245     /**
246      * {@code "websocket"}
247      */
248     public static final AsciiString WEBSOCKET = AsciiString.cached("websocket");
249     /**
250      * {@code "XmlHttpRequest"}
251      */
252     public static final AsciiString XML_HTTP_REQUEST = AsciiString.cached("XMLHttpRequest");
253 
254     private HttpHeaderValues() { }
255 }