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

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

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

HttpRequest.getParameters介绍

暂无

代码示例

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

@Override
public ConvertibleMultiValues<String> getRequestParameters() {
  return request.getParameters();
}

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

@Override
public HttpParameters getParameters() {
  return getDelegate().getParameters();
}

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

@Override
public BindingResult<T> bind(ArgumentConversionContext<T> context, HttpRequest<?> source) {
  ConvertibleMultiValues<String> parameters = source.getParameters();
  Argument<T> argument = context.getArgument();
  HttpMethod httpMethod = source.getMethod();

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

byType.put(Argument.of(HttpParameters.class).typeHashCode(), (RequestArgumentBinder<HttpParameters>) (argument, source) -> () -> Optional.of(source.getParameters()));
byType.put(Argument.of(Cookies.class).typeHashCode(), (RequestArgumentBinder<Cookies>) (argument, source) -> () -> Optional.of(source.getCookies()));
byType.put(Argument.of(Cookie.class).typeHashCode(), (RequestArgumentBinder<Cookie>) (context, source) -> {

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

@Override
public BindingResult<T> bind(ArgumentConversionContext<T> context, HttpRequest<?> source) {
  ConvertibleMultiValues<String> parameters = source.getParameters();
  Argument<T> argument = context.getArgument();
  HttpMethod httpMethod = source.getMethod();

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

@Override
  public Publisher<MutableHttpResponse<?>> doFilter(HttpRequest<?> request, ServerFilterChain chain) {
    Assert.that(request.getAttributes().contains("first"));
    Assert.that(!request.getAttributes().contains("second"));
    if(request.getParameters().get("username") == null) {
      return Publishers.just(HttpResponse.status(HttpStatus.FORBIDDEN));
    }
    else {
      request.getAttributes().put("authenticated", true);
      return Publishers.map(
          chain.proceed(request),
          mutableHttpResponse -> mutableHttpResponse.header("X-Test", "Foo " + request.getAttributes().get("SomeServiceValue", String.class, "none"))
      );
    }
  }
}

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

@Override
public HttpParameters getParameters() {
  return getDelegate().getParameters();
}

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

@Override
public BindingResult<T> bind(ArgumentConversionContext<T> context, HttpRequest<?> source) {
  ConvertibleMultiValues<String> parameters = source.getParameters();
  Argument<T> argument = context.getArgument();
  HttpMethod httpMethod = source.getMethod();

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

byType.put(Argument.of(HttpParameters.class).typeHashCode(), (RequestArgumentBinder<HttpParameters>) (argument, source) -> () -> Optional.of(source.getParameters()));
byType.put(Argument.of(Cookies.class).typeHashCode(), (RequestArgumentBinder<Cookies>) (argument, source) -> () -> Optional.of(source.getCookies()));
byType.put(Argument.of(Cookie.class).typeHashCode(), (RequestArgumentBinder<Cookie>) (context, source) -> {

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

@Override
public BindingResult<T> bind(ArgumentConversionContext<T> context, HttpRequest<?> source) {
  ConvertibleMultiValues<String> parameters = source.getParameters();
  Argument<T> argument = context.getArgument();
  HttpMethod httpMethod = source.getMethod();

相关文章