Class HttpUtils

java.lang.Object
org.apache.unomi.web.HttpUtils

public class HttpUtils extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 use
      response - the http servlet response object to use
      Throws:
      IOException - raised if there was a problem reading from the request or writing to the response