Package org.apache.unomi.utils
Class HttpUtils
- java.lang.Object
-
- org.apache.unomi.utils.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 Summary
Constructors Constructor Description HttpUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
dumpBasicRequestInfo(javax.servlet.http.HttpServletRequest httpServletRequest)
static String
dumpRequestCookies(javax.servlet.http.Cookie[] cookies)
static String
dumpRequestHeaders(javax.servlet.http.HttpServletRequest httpServletRequest)
static String
dumpRequestInfo(javax.servlet.http.HttpServletRequest httpServletRequest)
Utility to dump request info for a given http request.static List<Event>
filterValidEvents(com.fasterxml.jackson.databind.node.ArrayNode eventsNode, SchemaService schemaService, com.fasterxml.jackson.core.JsonParser jsonParser)
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.
-
-
-
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 parseconfigSharingService
- 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
-
-