public final class HttpUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
HttpUtil.ExtensionHeaderNames
Provides the HTTP header extensions used to carry HTTP/2 information in HTTP objects
|
| Modifier and Type | Field and Description |
|---|---|
static io.netty.handler.codec.http.HttpMethod |
OUT_OF_MESSAGE_SEQUENCE_METHOD
|
static String |
OUT_OF_MESSAGE_SEQUENCE_PATH
|
static io.netty.handler.codec.http.HttpResponseStatus |
OUT_OF_MESSAGE_SEQUENCE_RETURN_CODE
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addHttp2ToHttpHeaders(int streamId,
Http2Headers sourceHeaders,
io.netty.handler.codec.http.FullHttpMessage destinationMessage,
boolean addToTrailer)
Translate and add HTTP/2 headers to HTTP/1.x headers
|
static io.netty.handler.codec.http.HttpResponseStatus |
parseStatus(io.netty.handler.codec.AsciiString status)
Apply HTTP/2 rules while translating status code to
HttpResponseStatus |
static Http2Headers |
toHttp2Headers(io.netty.handler.codec.http.FullHttpMessage in)
Converts the given HTTP/1.x headers into HTTP/2 headers.
|
static io.netty.handler.codec.http.FullHttpRequest |
toHttpRequest(int streamId,
Http2Headers http2Headers,
boolean validateHttpHeaders)
Create a new object to contain the request data
|
static io.netty.handler.codec.http.FullHttpResponse |
toHttpResponse(int streamId,
Http2Headers http2Headers,
boolean validateHttpHeaders)
Create a new object to contain the response data
|
public static final io.netty.handler.codec.http.HttpMethod OUT_OF_MESSAGE_SEQUENCE_METHOD
HttpRequest objects generated out of the HTTP message flow defined in HTTP/2 Spec Message Flowpublic static final String OUT_OF_MESSAGE_SEQUENCE_PATH
HttpRequest objects generated out of the HTTP message flow defined in HTTP/2 Spec Message Flowpublic static final io.netty.handler.codec.http.HttpResponseStatus OUT_OF_MESSAGE_SEQUENCE_RETURN_CODE
HttpResponse objects generated out of the HTTP message flow defined
in HTTP/2 Spec Message Flowpublic static io.netty.handler.codec.http.HttpResponseStatus parseStatus(io.netty.handler.codec.AsciiString status)
throws Http2Exception
HttpResponseStatusstatus - The status from an HTTP/2 frameHttp2Exception - If there is a problem translating from HTTP/2 to HTTP/1.xpublic static io.netty.handler.codec.http.FullHttpResponse toHttpResponse(int streamId,
Http2Headers http2Headers,
boolean validateHttpHeaders)
throws Http2Exception
streamId - The stream associated with the responsehttp2Headers - The initial set of HTTP/2 headers to create the response withvalidateHttpHeaders - true to validate HTTP headers in the http-codecfalse not to validate HTTP headers in the http-codecHttp2Exception - see addHttp2ToHttpHeaders(int, Http2Headers, FullHttpMessage, boolean)public static io.netty.handler.codec.http.FullHttpRequest toHttpRequest(int streamId,
Http2Headers http2Headers,
boolean validateHttpHeaders)
throws Http2Exception
streamId - The stream associated with the requesthttp2Headers - The initial set of HTTP/2 headers to create the request withvalidateHttpHeaders - true to validate HTTP headers in the http-codecfalse not to validate HTTP headers in the http-codecHttp2Exception - see addHttp2ToHttpHeaders(int, Http2Headers, FullHttpMessage, boolean)public static void addHttp2ToHttpHeaders(int streamId,
Http2Headers sourceHeaders,
io.netty.handler.codec.http.FullHttpMessage destinationMessage,
boolean addToTrailer)
throws Http2Exception
streamId - The stream associated with sourceHeaderssourceHeaders - The HTTP/2 headers to convertdestinationMessage - The object which will contain the resulting HTTP/1.x headersaddToTrailer - true to add to trailing headers. false to add to initial headers.Http2Exception - If not all HTTP/2 headers can be translated to HTTP/1.xpublic static Http2Headers toHttp2Headers(io.netty.handler.codec.http.FullHttpMessage in) throws Exception
ExceptionCopyright © 2008–2015 The Netty Project. All rights reserved.