Package org.apache.unomi.web
Class HttpUtils
java.lang.Object
org.apache.unomi.web.HttpUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
setupCORSHeaders
(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.ServletResponse response) Setup CORS headers as soon as possible so that errors are not misconstrued on the client for CORS errors
-
Constructor Details
-
HttpUtils
public HttpUtils()
-
-
Method Details
-
setupCORSHeaders
public static void setupCORSHeaders(javax.servlet.http.HttpServletRequest httpServletRequest, javax.servlet.ServletResponse response) throws IOException Setup CORS headers as soon as possible so that errors are not misconstrued on the client for CORS errors- Parameters:
httpServletRequest
- the http servlet request object to useresponse
- the http servlet response object to use- Throws:
IOException
- raised if there was a problem reading from the request or writing to the response
-