Class HttpUtils


  • public class HttpUtils
    extends Object
    • Field Detail

      • EMPTY_BAD_REQUEST_RESPONSE

        public static final io.netty.handler.codec.http.FullHttpResponse EMPTY_BAD_REQUEST_RESPONSE
      • CONTINUE_RESPONSE

        public static final io.netty.handler.codec.http.FullHttpResponse CONTINUE_RESPONSE
    • Constructor Detail

      • HttpUtils

        public HttpUtils()
    • Method Detail

      • getPathWithoutContext

        public static String getPathWithoutContext​(io.netty.handler.codec.http.HttpRequest req,
                                                   String contextPath)
        Returns the path for the given HTTP request. This path does not contain any query string information, and the leading context path is removed.
      • getUriWithoutContext

        public static String getUriWithoutContext​(io.netty.handler.codec.http.HttpRequest req,
                                                  String contextPath)
        Returns the uri for the given HTTP request, but with the context path removed. The query string (if any) remains intact.