View Javadoc
1   /*
2    * ====================================================================
3    * Licensed to the Apache Software Foundation (ASF) under one
4    * or more contributor license agreements.  See the NOTICE file
5    * distributed with this work for additional information
6    * regarding copyright ownership.  The ASF licenses this file
7    * to you under the Apache License, Version 2.0 (the
8    * "License"); you may not use this file except in compliance
9    * with the License.  You may obtain a copy of the License at
10   *
11   *   http://www.apache.org/licenses/LICENSE-2.0
12   *
13   * Unless required by applicable law or agreed to in writing,
14   * software distributed under the License is distributed on an
15   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16   * KIND, either express or implied.  See the License for the
17   * specific language governing permissions and limitations
18   * under the License.
19   * ====================================================================
20   *
21   * This software consists of voluntary contributions made by many
22   * individuals on behalf of the Apache Software Foundation.  For more
23   * information on the Apache Software Foundation, please see
24   * <http://www.apache.org/>.
25   *
26   */
27  
28  package org.apache.hc.core5.http;
29  
30  /**
31   * Constants enumerating standard and common HTTP headers.
32   *
33   * @since 4.1
34   */
35  public final class HttpHeaders {
36  
37      private HttpHeaders() {
38          // Don't allow instantiation.
39      }
40  
41      public static final String ACCEPT = "Accept";
42  
43      public static final String ACCEPT_CHARSET = "Accept-Charset";
44  
45      public static final String ACCEPT_ENCODING = "Accept-Encoding";
46  
47      public static final String ACCEPT_LANGUAGE = "Accept-Language";
48  
49      public static final String ACCEPT_RANGES = "Accept-Ranges";
50  
51      /**
52       * The CORS {@code Access-Control-Allow-Credentials} response header field name.
53       */
54      public static final String ACCESS_CONTROL_ALLOW_CREDENTIALS = "Access-Control-Allow-Credentials";
55      /**
56       * The CORS {@code Access-Control-Allow-Headers} response header field name.
57       */
58      public static final String ACCESS_CONTROL_ALLOW_HEADERS = "Access-Control-Allow-Headers";
59      /**
60       * The CORS {@code Access-Control-Allow-Methods} response header field name.
61       */
62      public static final String ACCESS_CONTROL_ALLOW_METHODS = "Access-Control-Allow-Methods";
63      /**
64       * The CORS {@code Access-Control-Allow-Origin} response header field name.
65       */
66      public static final String ACCESS_CONTROL_ALLOW_ORIGIN = "Access-Control-Allow-Origin";
67      /**
68       * The CORS {@code Access-Control-Expose-Headers} response header field name.
69       */
70      public static final String ACCESS_CONTROL_EXPOSE_HEADERS = "Access-Control-Expose-Headers";
71      /**
72       * The CORS {@code Access-Control-Max-Age} response header field name.
73       */
74      public static final String ACCESS_CONTROL_MAX_AGE = "Access-Control-Max-Age";
75      /**
76       * The CORS {@code Access-Control-Request-Headers} request header field name.
77       */
78      public static final String ACCESS_CONTROL_REQUEST_HEADERS = "Access-Control-Request-Headers";
79      /**
80       * The CORS {@code Access-Control-Request-Method} request header field name.
81       */
82      public static final String ACCESS_CONTROL_REQUEST_METHOD = "Access-Control-Request-Method";
83  
84      public static final String AGE = "Age";
85  
86      public static final String ALLOW = "Allow";
87  
88      public static final String AUTHORIZATION = "Authorization";
89  
90      public static final String CACHE_CONTROL = "Cache-Control";
91  
92      public static final String CONNECTION = "Connection";
93  
94      public static final String CONTENT_ENCODING = "Content-Encoding";
95      /**
96       * The HTTP {@code Content-Disposition} header field name.
97       */
98      public static final String CONTENT_DISPOSITION = "Content-Disposition";
99  
100     public static final String CONTENT_LANGUAGE = "Content-Language";
101 
102     public static final String CONTENT_LENGTH = "Content-Length";
103 
104     public static final String CONTENT_LOCATION = "Content-Location";
105 
106     public static final String CONTENT_MD5 = "Content-MD5";
107 
108     public static final String CONTENT_RANGE = "Content-Range";
109 
110     public static final String CONTENT_TYPE = "Content-Type";
111 
112     /**
113      * The HTTP {@code Cookie} header field name.
114      */
115     public static final String COOKIE = "Cookie";
116 
117     public static final String DATE = "Date";
118 
119     public static final String DAV = "Dav";
120 
121     public static final String DEPTH = "Depth";
122 
123     public static final String DESTINATION = "Destination";
124 
125     public static final String ETAG = "ETag";
126 
127     public static final String EXPECT = "Expect";
128 
129     public static final String EXPIRES = "Expires";
130 
131     public static final String FROM = "From";
132 
133     public static final String HOST = "Host";
134 
135     public static final String IF = "If";
136 
137     public static final String IF_MATCH = "If-Match";
138 
139     public static final String IF_MODIFIED_SINCE = "If-Modified-Since";
140 
141     public static final String IF_NONE_MATCH = "If-None-Match";
142 
143     public static final String IF_RANGE = "If-Range";
144 
145     public static final String IF_UNMODIFIED_SINCE = "If-Unmodified-Since";
146 
147     public static final String KEEP_ALIVE = "Keep-Alive";
148 
149     public static final String LAST_MODIFIED = "Last-Modified";
150 
151     /**
152      * The HTTP {@code Link} header field name.
153      */
154     public static final String LINK = "Link";
155 
156     public static final String LOCATION = "Location";
157 
158     public static final String LOCK_TOKEN = "Lock-Token";
159 
160     public static final String MAX_FORWARDS = "Max-Forwards";
161 
162     public static final String OVERWRITE = "Overwrite";
163 
164     public static final String PRAGMA = "Pragma";
165 
166     public static final String PROXY_AUTHENTICATE = "Proxy-Authenticate";
167 
168     public static final String PROXY_AUTHORIZATION = "Proxy-Authorization";
169 
170     public static final String RANGE = "Range";
171 
172     public static final String REFERER = "Referer";
173 
174     public static final String RETRY_AFTER = "Retry-After";
175 
176     public static final String SERVER = "Server";
177 
178     public static final String STATUS_URI = "Status-URI";
179 
180     /**
181      * The HTTP {@code Set-Cookie} header field name.
182      */
183     public static final String SET_COOKIE = "Set-Cookie";
184 
185     public static final String TE = "TE";
186 
187     public static final String TIMEOUT = "Timeout";
188 
189     public static final String TRAILER = "Trailer";
190 
191     public static final String TRANSFER_ENCODING = "Transfer-Encoding";
192 
193     public static final String UPGRADE = "Upgrade";
194 
195     public static final String USER_AGENT = "User-Agent";
196 
197     public static final String VARY = "Vary";
198 
199     public static final String VIA = "Via";
200 
201     public static final String WARNING = "Warning";
202 
203     public static final String WWW_AUTHENTICATE = "WWW-Authenticate";
204 
205 }