Package | Description |
---|---|
io.netty.handler.codec.http |
Encoder, decoder and their related message types for HTTP.
|
io.netty.handler.codec.http.cors |
This package contains Cross Origin Resource Sharing (CORS) related classes.
|
io.netty.handler.codec.http.websocketx |
Encoder, decoder, handshakers and their related message types for
Web Socket data frames.
|
io.netty.handler.codec.http2 |
Handlers for sending and receiving HTTP/2 frames.
|
io.netty.handler.proxy |
Adds support for client connections via proxy protocols such as
SOCKS and
HTTP CONNECT tunneling
|
Modifier and Type | Class and Description |
---|---|
class |
CombinedHttpHeaders
Will add multiple values for the same header as single header with a comma separated list of values.
|
class |
DefaultHttpHeaders
Default implementation of
HttpHeaders . |
class |
EmptyHttpHeaders |
class |
ReadOnlyHttpHeaders
A variant of
HttpHeaders which only supports read-only methods. |
Modifier and Type | Field and Description |
---|---|
static HttpHeaders |
HttpHeaders.EMPTY_HEADERS
Deprecated.
Use
EmptyHttpHeaders.INSTANCE .
The instance is instantiated here to break the cyclic static initialization between |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
HttpHeaders.add(CharSequence name,
Iterable<?> values)
Adds a new header with the specified name and values.
|
HttpHeaders |
DefaultHttpHeaders.add(CharSequence name,
Iterable<?> values) |
HttpHeaders |
HttpHeaders.add(CharSequence name,
Object value)
Adds a new header with the specified name and value.
|
HttpHeaders |
DefaultHttpHeaders.add(CharSequence name,
Object value) |
HttpHeaders |
HttpHeaders.add(HttpHeaders headers)
Adds all header entries of the specified
headers . |
HttpHeaders |
DefaultHttpHeaders.add(HttpHeaders headers) |
HttpHeaders |
EmptyHttpHeaders.add(String name,
Iterable<?> values) |
abstract HttpHeaders |
HttpHeaders.add(String name,
Iterable<?> values) |
HttpHeaders |
ReadOnlyHttpHeaders.add(String name,
Iterable<?> values) |
HttpHeaders |
DefaultHttpHeaders.add(String name,
Iterable<?> values) |
HttpHeaders |
EmptyHttpHeaders.add(String name,
Object value) |
abstract HttpHeaders |
HttpHeaders.add(String name,
Object value) |
HttpHeaders |
ReadOnlyHttpHeaders.add(String name,
Object value) |
HttpHeaders |
DefaultHttpHeaders.add(String name,
Object value) |
HttpHeaders |
EmptyHttpHeaders.addInt(CharSequence name,
int value) |
abstract HttpHeaders |
HttpHeaders.addInt(CharSequence name,
int value)
Add the
name to value . |
HttpHeaders |
ReadOnlyHttpHeaders.addInt(CharSequence name,
int value) |
HttpHeaders |
DefaultHttpHeaders.addInt(CharSequence name,
int value) |
HttpHeaders |
EmptyHttpHeaders.addShort(CharSequence name,
short value) |
abstract HttpHeaders |
HttpHeaders.addShort(CharSequence name,
short value)
Add the
name to value . |
HttpHeaders |
ReadOnlyHttpHeaders.addShort(CharSequence name,
short value) |
HttpHeaders |
DefaultHttpHeaders.addShort(CharSequence name,
short value) |
HttpHeaders |
EmptyHttpHeaders.clear() |
abstract HttpHeaders |
HttpHeaders.clear()
Removes all headers from this
HttpMessage . |
HttpHeaders |
ReadOnlyHttpHeaders.clear() |
HttpHeaders |
DefaultHttpHeaders.clear() |
HttpHeaders |
HttpHeaders.copy()
Returns a deep copy of the passed in
HttpHeaders . |
HttpHeaders |
DefaultHttpHeaders.copy() |
HttpHeaders |
HttpMessage.headers()
Returns the headers of this message.
|
HttpHeaders |
DefaultHttpMessage.headers() |
HttpHeaders |
HttpHeadersFactory.newEmptyHeaders()
Create a new
HttpHeaders instance, but sized to be as small an object as possible. |
HttpHeaders |
DefaultHttpHeadersFactory.newEmptyHeaders() |
HttpHeaders |
HttpHeadersFactory.newHeaders()
Create a new
HttpHeaders instance. |
HttpHeaders |
DefaultHttpHeadersFactory.newHeaders() |
HttpHeaders |
HttpHeaders.remove(CharSequence name)
Removes the header with the specified name.
|
HttpHeaders |
DefaultHttpHeaders.remove(CharSequence name) |
HttpHeaders |
EmptyHttpHeaders.remove(String name) |
abstract HttpHeaders |
HttpHeaders.remove(String name) |
HttpHeaders |
ReadOnlyHttpHeaders.remove(String name) |
HttpHeaders |
DefaultHttpHeaders.remove(String name) |
HttpHeaders |
HttpHeaders.set(CharSequence name,
Iterable<?> values)
Sets a header with the specified name and values.
|
HttpHeaders |
DefaultHttpHeaders.set(CharSequence name,
Iterable<?> values) |
HttpHeaders |
HttpHeaders.set(CharSequence name,
Object value)
Sets a header with the specified name and value.
|
HttpHeaders |
DefaultHttpHeaders.set(CharSequence name,
Object value) |
HttpHeaders |
HttpHeaders.set(HttpHeaders headers)
Cleans the current header entries and copies all header entries of the specified
headers . |
HttpHeaders |
DefaultHttpHeaders.set(HttpHeaders headers) |
HttpHeaders |
EmptyHttpHeaders.set(String name,
Iterable<?> values) |
abstract HttpHeaders |
HttpHeaders.set(String name,
Iterable<?> values) |
HttpHeaders |
ReadOnlyHttpHeaders.set(String name,
Iterable<?> values) |
HttpHeaders |
DefaultHttpHeaders.set(String name,
Iterable<?> values) |
HttpHeaders |
EmptyHttpHeaders.set(String name,
Object value) |
abstract HttpHeaders |
HttpHeaders.set(String name,
Object value) |
HttpHeaders |
ReadOnlyHttpHeaders.set(String name,
Object value) |
HttpHeaders |
DefaultHttpHeaders.set(String name,
Object value) |
HttpHeaders |
HttpHeaders.setAll(HttpHeaders headers)
Retains all current headers but calls
set(String, Object) for each entry in headers |
HttpHeaders |
EmptyHttpHeaders.setInt(CharSequence name,
int value) |
abstract HttpHeaders |
HttpHeaders.setInt(CharSequence name,
int value)
Set the
name to value . |
HttpHeaders |
ReadOnlyHttpHeaders.setInt(CharSequence name,
int value) |
HttpHeaders |
DefaultHttpHeaders.setInt(CharSequence name,
int value) |
HttpHeaders |
EmptyHttpHeaders.setShort(CharSequence name,
short value) |
abstract HttpHeaders |
HttpHeaders.setShort(CharSequence name,
short value)
Set the
name to value . |
HttpHeaders |
ReadOnlyHttpHeaders.setShort(CharSequence name,
short value) |
HttpHeaders |
DefaultHttpHeaders.setShort(CharSequence name,
short value) |
HttpHeaders |
DefaultLastHttpContent.trailingHeaders() |
HttpHeaders |
LastHttpContent.trailingHeaders() |
HttpHeaders |
DefaultFullHttpResponse.trailingHeaders() |
HttpHeaders |
DefaultFullHttpRequest.trailingHeaders() |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
HttpHeaders.add(HttpHeaders headers)
Adds all header entries of the specified
headers . |
HttpHeaders |
DefaultHttpHeaders.add(HttpHeaders headers) |
protected void |
HttpObjectEncoder.encodeHeaders(HttpHeaders headers,
ByteBuf buf)
Encode the
HttpHeaders into a ByteBuf . |
boolean |
HttpServerUpgradeHandler.UpgradeCodec.prepareUpgradeResponse(ChannelHandlerContext ctx,
FullHttpRequest upgradeRequest,
HttpHeaders upgradeHeaders)
Prepares the
upgradeHeaders for a protocol update based upon the contents of upgradeRequest . |
HttpHeaders |
HttpHeaders.set(HttpHeaders headers)
Cleans the current header entries and copies all header entries of the specified
headers . |
HttpHeaders |
DefaultHttpHeaders.set(HttpHeaders headers) |
HttpHeaders |
HttpHeaders.setAll(HttpHeaders headers)
Retains all current headers but calls
set(String, Object) for each entry in headers |
static void |
HttpUtil.setKeepAlive(HttpHeaders h,
HttpVersion httpVersion,
boolean keepAlive)
Sets the value of the
"Connection" header depending on the
protocol version of the specified message. |
Constructor and Description |
---|
DefaultFullHttpRequest(HttpVersion httpVersion,
HttpMethod method,
String uri,
ByteBuf content,
HttpHeaders headers,
HttpHeaders trailingHeader)
Create a full HTTP response with the given HTTP version, method, URI, contents, and header and trailer objects.
|
DefaultFullHttpResponse(HttpVersion version,
HttpResponseStatus status,
ByteBuf content,
HttpHeaders headers,
HttpHeaders trailingHeaders)
Create an HTTP response with the given HTTP version, status, contents, headers and trailers.
|
DefaultHttpMessage(HttpVersion version,
HttpHeaders headers)
Creates a new instance.
|
DefaultHttpRequest(HttpVersion httpVersion,
HttpMethod method,
String uri,
HttpHeaders headers)
Creates a new instance.
|
DefaultHttpResponse(HttpVersion version,
HttpResponseStatus status,
HttpHeaders headers)
Creates a new instance.
|
DefaultLastHttpContent(ByteBuf content,
HttpHeaders trailingHeaders)
Create a new last HTTP content message with the given contents, and trailing headers.
|
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
CorsConfig.preflightResponseHeaders()
Returns HTTP response headers that should be added to a CORS preflight response.
|
Modifier and Type | Field and Description |
---|---|
protected HttpHeaders |
WebSocketClientHandshaker.customHeaders |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
WebSocketClientProtocolConfig.customHeaders() |
HttpHeaders |
WebSocketServerProtocolHandler.HandshakeComplete.requestHeaders() |
Modifier and Type | Method and Description |
---|---|
WebSocketClientProtocolConfig.Builder |
WebSocketClientProtocolConfig.Builder.customHeaders(HttpHeaders customHeaders)
Map of custom headers to add to the client request
|
ChannelFuture |
WebSocketServerHandshaker.handshake(Channel channel,
FullHttpRequest req,
HttpHeaders responseHeaders,
ChannelPromise promise)
Performs the opening handshake
When call this method you MUST NOT retain the
FullHttpRequest which is passed in. |
ChannelFuture |
WebSocketServerHandshaker.handshake(Channel channel,
HttpRequest req,
HttpHeaders responseHeaders,
ChannelPromise promise)
Performs the opening handshake
When call this method you MUST NOT retain the
HttpRequest which is passed in. |
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders)
Creates a new handshaker.
|
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Creates a new handshaker.
|
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch)
Creates a new handshaker.
|
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch,
long forceCloseTimeoutMillis)
Creates a new handshaker.
|
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch,
long forceCloseTimeoutMillis,
boolean absoluteUpgradeUrl)
Creates a new handshaker.
|
static WebSocketClientHandshaker |
WebSocketClientHandshakerFactory.newHandshaker(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch,
long forceCloseTimeoutMillis,
boolean absoluteUpgradeUrl,
boolean generateOriginHeader)
Creates a new handshaker.
|
protected FullHttpResponse |
WebSocketServerHandshaker07.newHandshakeResponse(FullHttpRequest req,
HttpHeaders headers)
Handle the web socket handshake for the web socket specification HyBi version 7.
|
protected abstract FullHttpResponse |
WebSocketServerHandshaker.newHandshakeResponse(FullHttpRequest req,
HttpHeaders responseHeaders)
Returns a new {@link FullHttpResponse) which will be used for as response to the handshake request.
|
protected FullHttpResponse |
WebSocketServerHandshaker00.newHandshakeResponse(FullHttpRequest req,
HttpHeaders headers)
Handle the web socket handshake for the web socket specification HyBi version 0 and lower.
|
protected FullHttpResponse |
WebSocketServerHandshaker13.newHandshakeResponse(FullHttpRequest req,
HttpHeaders headers)
Handle the web socket handshake for the web socket specification HyBi versions 13-17.
|
protected FullHttpResponse |
WebSocketServerHandshaker08.newHandshakeResponse(FullHttpRequest req,
HttpHeaders headers)
Handle the web socket handshake for the web socket specification HyBi version 8 to 10.
|
Constructor and Description |
---|
HandshakeComplete(String requestUri,
HttpHeaders requestHeaders,
String selectedSubprotocol) |
WebSocketClientHandshaker(URI uri,
WebSocketVersion version,
String subprotocol,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Base constructor
|
WebSocketClientHandshaker(URI uri,
WebSocketVersion version,
String subprotocol,
HttpHeaders customHeaders,
int maxFramePayloadLength,
long forceCloseTimeoutMillis)
Base constructor
|
WebSocketClientHandshaker(URI uri,
WebSocketVersion version,
String subprotocol,
HttpHeaders customHeaders,
int maxFramePayloadLength,
long forceCloseTimeoutMillis,
boolean absoluteUpgradeUrl)
Base constructor
|
WebSocketClientHandshaker(URI uri,
WebSocketVersion version,
String subprotocol,
HttpHeaders customHeaders,
int maxFramePayloadLength,
long forceCloseTimeoutMillis,
boolean absoluteUpgradeUrl,
boolean generateOriginHeader)
Base constructor
|
WebSocketClientHandshaker00(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Creates a new instance with the specified destination WebSocket location and version to initiate.
|
WebSocketClientHandshaker00(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
HttpHeaders customHeaders,
int maxFramePayloadLength,
long forceCloseTimeoutMillis)
Creates a new instance with the specified destination WebSocket location and version to initiate.
|
WebSocketClientHandshaker07(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Creates a new instance.
|
WebSocketClientHandshaker07(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch)
Creates a new instance.
|
WebSocketClientHandshaker07(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch,
long forceCloseTimeoutMillis)
Creates a new instance.
|
WebSocketClientHandshaker08(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Creates a new instance.
|
WebSocketClientHandshaker08(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch)
Creates a new instance.
|
WebSocketClientHandshaker08(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch,
long forceCloseTimeoutMillis)
Creates a new instance.
|
WebSocketClientHandshaker13(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Creates a new instance.
|
WebSocketClientHandshaker13(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch)
Creates a new instance.
|
WebSocketClientHandshaker13(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean performMasking,
boolean allowMaskMismatch,
long forceCloseTimeoutMillis)
Creates a new instance.
|
WebSocketClientProtocolHandler(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength)
Base constructor
|
WebSocketClientProtocolHandler(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean handleCloseFrames)
Base constructor
|
WebSocketClientProtocolHandler(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean handleCloseFrames,
boolean performMasking,
boolean allowMaskMismatch)
Base constructor
|
WebSocketClientProtocolHandler(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean handleCloseFrames,
boolean performMasking,
boolean allowMaskMismatch,
long handshakeTimeoutMillis)
Base constructor
|
WebSocketClientProtocolHandler(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
boolean handleCloseFrames,
long handshakeTimeoutMillis)
Base constructor
|
WebSocketClientProtocolHandler(URI webSocketURL,
WebSocketVersion version,
String subprotocol,
boolean allowExtensions,
HttpHeaders customHeaders,
int maxFramePayloadLength,
long handshakeTimeoutMillis)
Base constructor
|
Modifier and Type | Method and Description |
---|---|
static void |
HttpConversionUtil.addHttp2ToHttpHeaders(int streamId,
Http2Headers inputHeaders,
HttpHeaders outputHeaders,
HttpVersion httpVersion,
boolean isTrailer,
boolean isRequest)
Translate and add HTTP/2 headers to HTTP/1.x headers.
|
boolean |
Http2ServerUpgradeCodec.prepareUpgradeResponse(ChannelHandlerContext ctx,
FullHttpRequest upgradeRequest,
HttpHeaders headers) |
static Http2Headers |
HttpConversionUtil.toHttp2Headers(HttpHeaders inHeaders,
boolean validateHeaders) |
static void |
HttpConversionUtil.toHttp2Headers(HttpHeaders inHeaders,
Http2Headers out) |
Modifier and Type | Method and Description |
---|---|
HttpHeaders |
HttpProxyHandler.HttpProxyConnectException.headers()
Returns headers, if any.
|
Constructor and Description |
---|
HttpProxyConnectException(String message,
HttpHeaders headers) |
HttpProxyHandler(SocketAddress proxyAddress,
HttpHeaders headers) |
HttpProxyHandler(SocketAddress proxyAddress,
HttpHeaders headers,
boolean ignoreDefaultPortsInConnectHostHeader) |
HttpProxyHandler(SocketAddress proxyAddress,
String username,
String password,
HttpHeaders headers) |
HttpProxyHandler(SocketAddress proxyAddress,
String username,
String password,
HttpHeaders headers,
boolean ignoreDefaultPortsInConnectHostHeader) |
Copyright © 2008–2024 The Netty Project. All rights reserved.