Class HttpUtils


  • public class HttpUtils
    extends Object
    This is duplicate of the class from the wab bundle, the original file will be removed once endpoints forwarded
    • Constructor Detail

      • HttpUtils

        public HttpUtils()
    • Method Detail

      • dumpRequestInfo

        public static String dumpRequestInfo​(javax.servlet.http.HttpServletRequest httpServletRequest)
        Utility to dump request info for a given http request.
        Parameters:
        httpServletRequest - request to dump
        Returns:
        the info as a String
      • dumpBasicRequestInfo

        public static String dumpBasicRequestInfo​(javax.servlet.http.HttpServletRequest httpServletRequest)
      • dumpRequestCookies

        public static String dumpRequestCookies​(javax.servlet.http.Cookie[] cookies)
      • dumpRequestHeaders

        public static String dumpRequestHeaders​(javax.servlet.http.HttpServletRequest httpServletRequest)
      • getProfileCookieString

        public static String getProfileCookieString​(Profile profile,
                                                    ConfigSharingService configSharingService,
                                                    boolean isSecure)
        Return the cookie string for the given profile We can't use the build in NewCookie jax-rs object as it does not support the SameSite value.
        Parameters:
        profile - to parse
        configSharingService - shared config location.
        Returns:
        the cookie string to set in the header.
      • filterValidEvents

        public static List<Event> filterValidEvents​(com.fasterxml.jackson.databind.node.ArrayNode eventsNode,
                                                    SchemaService schemaService,
                                                    com.fasterxml.jackson.core.JsonParser jsonParser)
                                             throws com.fasterxml.jackson.core.JsonProcessingException
        Throws:
        com.fasterxml.jackson.core.JsonProcessingException