Class RequestUtils

java.lang.Object
io.gravitee.am.service.utils.vertx.RequestUtils

public class RequestUtils extends Object
Author:
Titouan COMPIEGNE (titouan.compiegne at graviteesource.com), GraviteeSource Team
  • Constructor Details

    • RequestUtils

      public RequestUtils()
  • Method Details

    • remoteAddress

      public static String remoteAddress(io.vertx.rxjava3.core.http.HttpServerRequest httpServerRequest)
    • userAgent

      public static String userAgent(io.vertx.rxjava3.core.http.HttpServerRequest httpServerRequest)
    • remoteAddress

      public static String remoteAddress(io.vertx.core.http.HttpServerRequest httpServerRequest)
    • userAgent

      public static String userAgent(io.vertx.core.http.HttpServerRequest httpServerRequest)
    • getQueryParams

      public static io.vertx.rxjava3.core.MultiMap getQueryParams(io.vertx.rxjava3.core.http.HttpServerRequest httpServerRequest)
      Extract query parameters from request as a MultiMap
      Parameters:
      httpServerRequest - the request from which extract the query parameters.
      Returns:
      all query parameters as a MultiMap.
    • getCleanedQueryParams

      public static io.vertx.rxjava3.core.MultiMap getCleanedQueryParams(io.vertx.rxjava3.core.http.HttpServerRequest httpServerRequest)
      Same as getQueryParams(HttpServerRequest) but removes some query parameters used internally (eg: error, error_description, success, ...).
      Parameters:
      httpServerRequest - the request from which extract the query parameters.
      Returns:
      all cleaned query parameters as a MultiMap.
    • getCleanedQueryParams

      public static io.vertx.rxjava3.core.MultiMap getCleanedQueryParams(String uri)
      Same as getQueryParams(HttpServerRequest) but removes some query parameters used internally (eg: error, error_description, success, ...).
      Parameters:
      uri - the request uri from which extract the query parameters.
      Returns:
      all cleaned query parameters as a MultiMap.
    • cleanParams

      public static io.vertx.rxjava3.core.MultiMap cleanParams(io.vertx.rxjava3.core.MultiMap params)
    • getQueryParams

      public static io.vertx.rxjava3.core.MultiMap getQueryParams(String url)
      Same as getQueryParams(HttpServerRequest) but taking a complete url.
      Parameters:
      url - the url from which extract the query parameters.
      Returns:
      all query parameters as a MultiMap.
    • getQueryParams

      public static io.vertx.rxjava3.core.MultiMap getQueryParams(String queryString, boolean hasPath)
      Same as getQueryParams(HttpServerRequest) but taking an url or only the query string part (eg: hasPath).
      Parameters:
      queryString - the url from which extract the query parameters.
      hasPath - flag indicating if the queryString is a complete url or is just the query string part.
      Returns:
      all query parameters as a MultiMap.
    • getDomain

      public static String getDomain(String url)
    • getUrlWithoutParameters

      public static String getUrlWithoutParameters(String url)