Uses of Class
io.netty.handler.codec.http.HttpHeaders
Packages that use HttpHeaders
Package
Description
Encoder, decoder and their related message types for HTTP.
This package contains Cross Origin Resource Sharing (CORS) related classes.
Encoder, decoder, handshakers and their related message types for
Web Socket data frames.
-
Uses of HttpHeaders in io.netty.handler.codec.http
Subclasses of HttpHeaders in io.netty.handler.codec.httpModifier and TypeClassDescriptionclassWill add multiple values for the same header as single header with a comma separated list of values.classDefault implementation ofHttpHeaders.classfinal classA variant ofHttpHeaderswhich only supports read-only methods.Fields in io.netty.handler.codec.http declared as HttpHeadersMethods in io.netty.handler.codec.http that return HttpHeadersModifier and TypeMethodDescriptionDefaultHttpHeaders.add(HttpHeaders headers) DefaultHttpHeaders.add(CharSequence name, Iterable<?> values) DefaultHttpHeaders.add(CharSequence name, Object value) HttpHeaders.add(HttpHeaders headers) Adds all header entries of the specifiedheaders.HttpHeaders.add(CharSequence name, Iterable<?> values) Adds a new header with the specified name and values.HttpHeaders.add(CharSequence name, Object value) Adds a new header with the specified name and value.abstract HttpHeadersabstract HttpHeadersDefaultHttpHeaders.addInt(CharSequence name, int value) EmptyHttpHeaders.addInt(CharSequence name, int value) abstract HttpHeadersHttpHeaders.addInt(CharSequence name, int value) Add thenametovalue.ReadOnlyHttpHeaders.addInt(CharSequence name, int value) DefaultHttpHeaders.addShort(CharSequence name, short value) EmptyHttpHeaders.addShort(CharSequence name, short value) abstract HttpHeadersHttpHeaders.addShort(CharSequence name, short value) Add thenametovalue.ReadOnlyHttpHeaders.addShort(CharSequence name, short value) DefaultHttpHeaders.clear()EmptyHttpHeaders.clear()abstract HttpHeadersHttpHeaders.clear()Removes all headers from thisHttpMessage.ReadOnlyHttpHeaders.clear()DefaultHttpHeaders.copy()HttpHeaders.copy()Returns a deep copy of the passed inHttpHeaders.DefaultHttpMessage.headers()HttpMessage.headers()Returns the headers of this message.DefaultHttpHeadersFactory.newEmptyHeaders()HttpHeadersFactory.newEmptyHeaders()Create a newHttpHeadersinstance, but sized to be as small an object as possible.DefaultHttpHeadersFactory.newHeaders()HttpHeadersFactory.newHeaders()Create a newHttpHeadersinstance.DefaultHttpHeaders.remove(CharSequence name) HttpHeaders.remove(CharSequence name) Removes the header with the specified name.abstract HttpHeadersDefaultHttpHeaders.set(HttpHeaders headers) DefaultHttpHeaders.set(CharSequence name, Iterable<?> values) DefaultHttpHeaders.set(CharSequence name, Object value) HttpHeaders.set(HttpHeaders headers) Cleans the current header entries and copies all header entries of the specifiedheaders.HttpHeaders.set(CharSequence name, Iterable<?> values) Sets a header with the specified name and values.HttpHeaders.set(CharSequence name, Object value) Sets a header with the specified name and value.abstract HttpHeadersabstract HttpHeadersHttpHeaders.setAll(HttpHeaders headers) Retains all current headers but callsset(String, Object)for each entry inheadersDefaultHttpHeaders.setInt(CharSequence name, int value) EmptyHttpHeaders.setInt(CharSequence name, int value) abstract HttpHeadersHttpHeaders.setInt(CharSequence name, int value) Set thenametovalue.ReadOnlyHttpHeaders.setInt(CharSequence name, int value) DefaultHttpHeaders.setShort(CharSequence name, short value) EmptyHttpHeaders.setShort(CharSequence name, short value) abstract HttpHeadersHttpHeaders.setShort(CharSequence name, short value) Set thenametovalue.ReadOnlyHttpHeaders.setShort(CharSequence name, short value) DefaultFullHttpRequest.trailingHeaders()DefaultFullHttpResponse.trailingHeaders()DefaultLastHttpContent.trailingHeaders()LastHttpContent.trailingHeaders()Methods in io.netty.handler.codec.http with parameters of type HttpHeadersModifier and TypeMethodDescriptionDefaultHttpHeaders.add(HttpHeaders headers) HttpHeaders.add(HttpHeaders headers) Adds all header entries of the specifiedheaders.protected voidHttpObjectEncoder.encodeHeaders(HttpHeaders headers, io.netty.buffer.ByteBuf buf) Encode theHttpHeadersinto aByteBuf.booleanHttpServerUpgradeHandler.UpgradeCodec.prepareUpgradeResponse(io.netty.channel.ChannelHandlerContext ctx, FullHttpRequest upgradeRequest, HttpHeaders upgradeHeaders) Prepares theupgradeHeadersfor a protocol update based upon the contents ofupgradeRequest.DefaultHttpHeaders.set(HttpHeaders headers) HttpHeaders.set(HttpHeaders headers) Cleans the current header entries and copies all header entries of the specifiedheaders.HttpHeaders.setAll(HttpHeaders headers) Retains all current headers but callsset(String, Object)for each entry inheadersstatic voidHttpUtil.setKeepAlive(HttpHeaders h, HttpVersion httpVersion, boolean keepAlive) Sets the value of the"Connection"header depending on the protocol version of the specified message.Constructors in io.netty.handler.codec.http with parameters of type HttpHeadersModifierConstructorDescriptionDefaultFullHttpRequest(HttpVersion httpVersion, HttpMethod method, String uri, io.netty.buffer.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, io.netty.buffer.ByteBuf content, HttpHeaders headers, HttpHeaders trailingHeaders) Create an HTTP response with the given HTTP version, status, contents, headers and trailers.protectedDefaultHttpMessage(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(io.netty.buffer.ByteBuf content, HttpHeaders trailingHeaders) Create a new last HTTP content message with the given contents, and trailing headers. -
Uses of HttpHeaders in io.netty.handler.codec.http.cors
Methods in io.netty.handler.codec.http.cors that return HttpHeadersModifier and TypeMethodDescriptionCorsConfig.preflightResponseHeaders()Returns HTTP response headers that should be added to a CORS preflight response. -
Uses of HttpHeaders in io.netty.handler.codec.http.websocketx
Fields in io.netty.handler.codec.http.websocketx declared as HttpHeadersModifier and TypeFieldDescriptionprotected final HttpHeadersWebSocketClientHandshaker.customHeadersMethods in io.netty.handler.codec.http.websocketx that return HttpHeadersModifier and TypeMethodDescriptionWebSocketClientProtocolConfig.customHeaders()WebSocketServerProtocolHandler.HandshakeComplete.requestHeaders()Methods in io.netty.handler.codec.http.websocketx with parameters of type HttpHeadersModifier and TypeMethodDescriptionWebSocketClientProtocolConfig.Builder.customHeaders(HttpHeaders customHeaders) Map of custom headers to add to the client requestfinal io.netty.channel.ChannelFutureWebSocketServerHandshaker.handshake(io.netty.channel.Channel channel, FullHttpRequest req, HttpHeaders responseHeaders, io.netty.channel.ChannelPromise promise) Performs the opening handshake When call this method you MUST NOT retain theFullHttpRequestwhich is passed in.final io.netty.channel.ChannelFutureWebSocketServerHandshaker.handshake(io.netty.channel.Channel channel, HttpRequest req, HttpHeaders responseHeaders, io.netty.channel.ChannelPromise promise) Performs the opening handshake When call this method you MUST NOT retain theHttpRequestwhich is passed in.static WebSocketClientHandshakerWebSocketClientHandshakerFactory.newHandshaker(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders) Creates a new handshaker.static WebSocketClientHandshakerWebSocketClientHandshakerFactory.newHandshaker(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength) Creates a new handshaker.static WebSocketClientHandshakerWebSocketClientHandshakerFactory.newHandshaker(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean performMasking, boolean allowMaskMismatch) Creates a new handshaker.static WebSocketClientHandshakerWebSocketClientHandshakerFactory.newHandshaker(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean performMasking, boolean allowMaskMismatch, long forceCloseTimeoutMillis) Creates a new handshaker.static WebSocketClientHandshakerWebSocketClientHandshakerFactory.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 WebSocketClientHandshakerWebSocketClientHandshakerFactory.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 abstract FullHttpResponseWebSocketServerHandshaker.newHandshakeResponse(FullHttpRequest req, HttpHeaders responseHeaders) Returns a newinvalid @link
{@link FullHttpResponse) which will be used for as response to the handshake request.protected FullHttpResponseWebSocketServerHandshaker00.newHandshakeResponse(FullHttpRequest req, HttpHeaders headers) Handle the web socket handshake for the web socket specification HyBi version 0 and lower.protected FullHttpResponseWebSocketServerHandshaker07.newHandshakeResponse(FullHttpRequest req, HttpHeaders headers) Handle the web socket handshake for the web socket specification HyBi version 7.protected FullHttpResponseWebSocketServerHandshaker08.newHandshakeResponse(FullHttpRequest req, HttpHeaders headers) Handle the web socket handshake for the web socket specification HyBi version 8 to 10.protected FullHttpResponseWebSocketServerHandshaker13.newHandshakeResponse(FullHttpRequest req, HttpHeaders headers) Handle the web socket handshake for the web socket specification HyBi versions 13-17.Constructors in io.netty.handler.codec.http.websocketx with parameters of type HttpHeadersModifierConstructorDescriptionHandshakeComplete(String requestUri, HttpHeaders requestHeaders, String selectedSubprotocol) protectedWebSocketClientHandshaker(URI uri, WebSocketVersion version, String subprotocol, HttpHeaders customHeaders, int maxFramePayloadLength) Base constructorprotectedWebSocketClientHandshaker(URI uri, WebSocketVersion version, String subprotocol, HttpHeaders customHeaders, int maxFramePayloadLength, long forceCloseTimeoutMillis) Base constructorprotectedWebSocketClientHandshaker(URI uri, WebSocketVersion version, String subprotocol, HttpHeaders customHeaders, int maxFramePayloadLength, long forceCloseTimeoutMillis, boolean absoluteUpgradeUrl) Base constructorprotectedWebSocketClientHandshaker(URI uri, WebSocketVersion version, String subprotocol, HttpHeaders customHeaders, int maxFramePayloadLength, long forceCloseTimeoutMillis, boolean absoluteUpgradeUrl, boolean generateOriginHeader) Base constructorWebSocketClientHandshaker00(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 constructorWebSocketClientProtocolHandler(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean handleCloseFrames) Base constructorWebSocketClientProtocolHandler(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean handleCloseFrames, boolean performMasking, boolean allowMaskMismatch) Base constructorWebSocketClientProtocolHandler(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean handleCloseFrames, boolean performMasking, boolean allowMaskMismatch, long handshakeTimeoutMillis) Base constructorWebSocketClientProtocolHandler(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, boolean handleCloseFrames, long handshakeTimeoutMillis) Base constructorWebSocketClientProtocolHandler(URI webSocketURL, WebSocketVersion version, String subprotocol, boolean allowExtensions, HttpHeaders customHeaders, int maxFramePayloadLength, long handshakeTimeoutMillis) Base constructor
EmptyHttpHeaders.INSTANCE.