Add more HttpHeaders values

Motivation:
Some commons values are missing from HttpHeader values constants.

Modifications:
- Add constants for "application/json" Content-Type
- Add constants for "gzip,deflate" Content-Encoding

Result:
More HttpHeader values constants available, both in
`HttpHeaders.Values` and `HttpHeaderValues`.
This commit is contained in:
Stephane Landelle 2016-06-14 14:10:45 +02:00 committed by Scott Mitchell
parent fe569ea7a3
commit 819b26b4bc
2 changed files with 16 additions and 0 deletions

View File

@ -22,6 +22,10 @@ import io.netty.util.AsciiString;
* Standard HTTP header values.
*/
public final class HttpHeaderValues {
/**
* {@code "application/json"}
*/
public static final AsciiString APPLICATION_JSON = new AsciiString("application/json");
/**
* {@code "application/x-www-form-urlencoded"}
*/
@ -99,6 +103,10 @@ public final class HttpHeaderValues {
* {@code "gzip"}
*/
public static final AsciiString GZIP = new AsciiString("gzip");
/**
* {@code "gzip,deflate"}
*/
public static final AsciiString GZIP_DEFLATE = new AsciiString("gzip,deflate");
/**
* {@code "x-gzip"}
*/

View File

@ -358,6 +358,10 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
*/
@Deprecated
public static final class Values {
/**
* {@code "application/json"}
*/
public static final String APPLICATION_JSON = "application/json";
/**
* {@code "application/x-www-form-urlencoded"}
*/
@ -407,6 +411,10 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
* {@code "gzip"}
*/
public static final String GZIP = "gzip";
/**
* {@code "gzip,deflate"}
*/
public static final String GZIP_DEFLATE = "gzip,deflate";
/**
* {@code "identity"}
*/