java.lang.Object
stincmale.server.netty4.tcp.http.util.HttpUtil
public final class HttpUtil extends Object
Provides useful utility methods.
-
Method Summary
Modifier and Type Method Description static FullHttpResponse
createHttpResponse(HttpVersion version, HttpResponseStatus status)
static Optional<String>
getRemoteAddress(HttpHeaders headers)
static Optional<String>
getRemoteAddress(HttpHeaders headers, Channel channel)
static FullHttpResponse
setPlainTextUtf8Content(FullHttpResponse httpResponse, String content)
-
Method Details
-
createHttpResponse
public static final FullHttpResponse createHttpResponse(HttpVersion version, HttpResponseStatus status) -
setPlainTextUtf8Content
public static final FullHttpResponse setPlainTextUtf8Content(FullHttpResponse httpResponse, @Nullable String content) -
getRemoteAddress
-
getRemoteAddress
-