io.micronaut.http.HttpRequest.getPath()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.2k)|赞(0)|评价(0)|浏览(179)

本文整理了Java中io.micronaut.http.HttpRequest.getPath()方法的一些代码示例,展示了HttpRequest.getPath()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HttpRequest.getPath()方法的具体详情如下:
包路径:io.micronaut.http.HttpRequest
类名称:HttpRequest
方法名:getPath

HttpRequest.getPath介绍

暂无

代码示例

代码示例来源:origin: micronaut-projects/micronaut-core

@Override
public String getPath() {
  return getDelegate().getPath();
}

代码示例来源:origin: micronaut-projects/micronaut-core

ctx.channel().config().setAutoRead(false);
io.micronaut.http.HttpMethod httpMethod = request.getMethod();
String requestPath = request.getPath();

代码示例来源:origin: io.micronaut/micronaut-http

@Override
public String getPath() {
  return getDelegate().getPath();
}

代码示例来源:origin: io.micronaut/router

/**
   * @param request The Http request
   * @return The optional route match
   */
  public static Optional<RouteMatch> findRouteMatchAtRequest(HttpRequest<?> request) {
    Optional<RouteMatch> routeMatchAttribute = request.getAttribute(HttpAttributes.ROUTE_MATCH, RouteMatch.class);
    if (routeMatchAttribute.isPresent()) {
      return routeMatchAttribute;
    } else {
      if (LOG.isDebugEnabled()) {
        LOG.debug("Route match attribute for request ({}) not found", request.getPath());
      }
      return Optional.empty();
    }
  }
}

相关文章