Package org.openrefine.commands
Class HttpUtilities
- java.lang.Object
-
- org.openrefine.commands.HttpUtilities
-
public abstract class HttpUtilities extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description HttpUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intgetIntegerParameter(javax.servlet.http.HttpServletRequest request, String name, int def)static voidredirect(javax.servlet.http.HttpServletResponse response, String url)static voidrespond(javax.servlet.http.HttpServletResponse response, String content)static voidrespond(javax.servlet.http.HttpServletResponse response, String status, String message)static voidrespondException(javax.servlet.http.HttpServletResponse response, Exception e)static voidrespondJSON(javax.servlet.http.HttpServletResponse response, Object o)static voidrespondJSON(javax.servlet.http.HttpServletResponse response, Object o, Properties options)static voidrespondWithErrorPage(RefineServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String message, int status, Throwable e)static voidrespondWithErrorPage(RefineServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String message, Throwable e)
-
-
-
Method Detail
-
respond
public static void respond(javax.servlet.http.HttpServletResponse response, String content) throws IOException, javax.servlet.ServletException- Throws:
IOExceptionjavax.servlet.ServletException
-
respond
public static void respond(javax.servlet.http.HttpServletResponse response, String status, String message) throws IOException- Throws:
IOException
-
respondJSON
public static void respondJSON(javax.servlet.http.HttpServletResponse response, Object o) throws IOException- Throws:
IOException
-
respondJSON
public static void respondJSON(javax.servlet.http.HttpServletResponse response, Object o, Properties options) throws IOException- Throws:
IOException
-
respondException
public static void respondException(javax.servlet.http.HttpServletResponse response, Exception e) throws IOException, javax.servlet.ServletException- Throws:
IOExceptionjavax.servlet.ServletException
-
redirect
public static void redirect(javax.servlet.http.HttpServletResponse response, String url) throws IOException- Throws:
IOException
-
getIntegerParameter
public static int getIntegerParameter(javax.servlet.http.HttpServletRequest request, String name, int def)
-
respondWithErrorPage
public static void respondWithErrorPage(RefineServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String message, Throwable e)
-
respondWithErrorPage
public static void respondWithErrorPage(RefineServlet servlet, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String message, int status, Throwable e)
-
-