类 RequestUtils

java.lang.Object
com.publiccms.common.tools.RequestUtils

public class RequestUtils extends Object
Request工具类 RequestUtils
  • 字段详细资料

  • 构造器详细资料

    • RequestUtils

      private RequestUtils()
  • 方法详细资料

    • getValue

      public static String getValue(Map<String,String[]> parameterMap, String key)
      参数:
      parameterMap -
      key -
      返回:
      parameter value
    • getOrigin

      public static String getOrigin(jakarta.servlet.http.HttpServletRequest request)
      参数:
      request -
      返回:
      origin
    • getEncodePath

      public static String getEncodePath(String path, String queryString)
      获取转码路径
      参数:
      path -
      queryString -
      返回:
      encoded path
    • removeCRLF

      public static String removeCRLF(String string)
      参数:
      string -
      返回:
    • removeCRLF

      public static void removeCRLF(String[] values)
      参数:
      values -
    • getUserAgent

      public static String getUserAgent(jakarta.servlet.http.HttpServletRequest request)
      获取UserAgent
      参数:
      request -
      返回:
      user agent
    • getAccept

      public static String getAccept(jakarta.servlet.http.HttpServletRequest request)
      参数:
      request -
      返回:
      accept
    • getCookie

      public static jakarta.servlet.http.Cookie getCookie(jakarta.servlet.http.Cookie[] cookies, String name)
      参数:
      cookies -
      name -
      返回:
      cookie
    • addCookie

      public static jakarta.servlet.http.Cookie addCookie(String contextPath, String schema, jakarta.servlet.http.HttpServletResponse response, String name, String value, Integer expiry, String domain)
      参数:
      contextPath -
      schema -
      response -
      name -
      value -
      expiry -
      domain -
      返回:
      cookie
    • cancleCookie

      public static void cancleCookie(String contextPath, String schema, jakarta.servlet.http.HttpServletResponse response, String name, String domain)
      参数:
      contextPath -
      schema -
      response -
      name -
      domain -
    • getIpAddress

      public static String getIpAddress(jakarta.servlet.http.HttpServletRequest request)
      参数:
      request -
      返回:
      ip address