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:
parent
fe569ea7a3
commit
819b26b4bc
@ -22,6 +22,10 @@ import io.netty.util.AsciiString;
|
|||||||
* Standard HTTP header values.
|
* Standard HTTP header values.
|
||||||
*/
|
*/
|
||||||
public final class HttpHeaderValues {
|
public final class HttpHeaderValues {
|
||||||
|
/**
|
||||||
|
* {@code "application/json"}
|
||||||
|
*/
|
||||||
|
public static final AsciiString APPLICATION_JSON = new AsciiString("application/json");
|
||||||
/**
|
/**
|
||||||
* {@code "application/x-www-form-urlencoded"}
|
* {@code "application/x-www-form-urlencoded"}
|
||||||
*/
|
*/
|
||||||
@ -99,6 +103,10 @@ public final class HttpHeaderValues {
|
|||||||
* {@code "gzip"}
|
* {@code "gzip"}
|
||||||
*/
|
*/
|
||||||
public static final AsciiString GZIP = new AsciiString("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"}
|
* {@code "x-gzip"}
|
||||||
*/
|
*/
|
||||||
|
@ -358,6 +358,10 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
|||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public static final class Values {
|
public static final class Values {
|
||||||
|
/**
|
||||||
|
* {@code "application/json"}
|
||||||
|
*/
|
||||||
|
public static final String APPLICATION_JSON = "application/json";
|
||||||
/**
|
/**
|
||||||
* {@code "application/x-www-form-urlencoded"}
|
* {@code "application/x-www-form-urlencoded"}
|
||||||
*/
|
*/
|
||||||
@ -407,6 +411,10 @@ public abstract class HttpHeaders implements Iterable<Map.Entry<String, String>>
|
|||||||
* {@code "gzip"}
|
* {@code "gzip"}
|
||||||
*/
|
*/
|
||||||
public static final String GZIP = "gzip";
|
public static final String GZIP = "gzip";
|
||||||
|
/**
|
||||||
|
* {@code "gzip,deflate"}
|
||||||
|
*/
|
||||||
|
public static final String GZIP_DEFLATE = "gzip,deflate";
|
||||||
/**
|
/**
|
||||||
* {@code "identity"}
|
* {@code "identity"}
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user