Uses of Interface
io.muserver.Headers
-
Packages that use Headers Package Description io.muserver This package contains the main API of mu-server, for example the server builders, request and response objects.io.muserver.handlers Some pre-built handlers for common tasks such as file handling. -
-
Uses of Headers in io.muserver
Methods in io.muserver that return Headers Modifier and Type Method Description Headers
Headers. add(Headers headers)
Adds all headers from another headers object to thisHeaders
Headers. add(java.lang.CharSequence name, java.lang.Iterable<?> values)
Adds an item to these headers.Headers
Headers. add(java.lang.CharSequence name, java.lang.Object value)
Adds an item to these headers.Headers
Headers. add(java.lang.String name, java.lang.Iterable<?> values)
Adds an item to these headers.Headers
Headers. add(java.lang.String name, java.lang.Object value)
Adds an item to these headers.Headers
Headers. addInt(java.lang.CharSequence name, int value)
Adds an integer valueHeaders
Headers. clear()
Headers
MuRequest. headers()
Headers
MuResponse. headers()
Gets the response headers map which can be used to specify response headers.static Headers
Headers. http1Headers()
Creates new headers for HTTP1 requestsstatic Headers
Headers. http2Headers()
Creates new headers for HTTP2 requestsHeaders
Headers. remove(java.lang.CharSequence name)
Removes a header.Headers
Headers. remove(java.lang.String name)
Removes a header.Headers
Headers. set(Headers headers)
Removes all the current headers and adds them from the given headers.Headers
Headers. set(java.lang.CharSequence name, java.lang.Iterable<?> values)
Sets a header value list.Headers
Headers. set(java.lang.CharSequence name, java.lang.Object value)
Sets a header value.Headers
Headers. set(java.lang.String name, java.lang.Iterable<?> values)
Sets a header value list.Headers
Headers. set(java.lang.String name, java.lang.Object value)
Sets a header value.Headers
Headers. setAll(Headers headers)
Sets all the values from the given headers object, overwriting any existing headers with the same names.Headers
Headers. setInt(java.lang.CharSequence name, int value)
Sets the given integer value, replacing the existing value if it is already set.Methods in io.muserver with parameters of type Headers Modifier and Type Method Description Headers
Headers. add(Headers headers)
Adds all headers from another headers object to thisMuWebSocket
MuWebSocketFactory. create(MuRequest request, Headers responseHeaders)
Creates a web socket for an upgrade request.Headers
Headers. set(Headers headers)
Removes all the current headers and adds them from the given headers.Headers
Headers. setAll(Headers headers)
Sets all the values from the given headers object, overwriting any existing headers with the same names. -
Uses of Headers in io.muserver.handlers
Methods in io.muserver.handlers that return Headers Modifier and Type Method Description Headers
ResourceType. headers()
static Headers
ResourceType. noCache()
static Headers
ResourceType. shortCache()
Methods in io.muserver.handlers with parameters of type Headers Modifier and Type Method Description default void
ResourceCustomizer. beforeHeadersSent(MuRequest request, Headers responseHeaders)
Called after the default headers have been set, just before they are sent to the client.Constructors in io.muserver.handlers with parameters of type Headers Constructor Description ResourceType(java.lang.CharSequence mimeType, Headers headers, boolean gzip, java.util.List<java.lang.String> extensions)
Creates a new resource type.
-