gpt4 book ai didi

com.jetdrone.vertx.yoke.middleware.YokeRequest.formAttributes()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 11:46:40 25 4
gpt4 key购买 nike

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

YokeRequest.formAttributes介绍

暂无

代码示例

代码示例来源:origin: pmlopes/yoke

@Override
public Map<String, String[]> getRequestParameters() {
  final Map<String, String[]> map = new HashMap<>();
  if (request.params().get("pac4jFormAttributes") != null) {
    for (String name : request.formAttributes().names()) {
      map.put(name, request.formAttributes().getAll(name).toArray(new String[0]));
    }
  }
  for (String name : request.params().names()) {
    map.put(name, request.params().getAll(name).toArray(new String[0]));
  }
  return map;
}

代码示例来源:origin: pmlopes/yoke

@Override
public String getRequestParameter(String name) {
  String param = request.params().get(name);
  if (param == null & request.params().get("pac4jFormAttributes") != null) {
    param = request.formAttributes().get(name);
    if (param != null) {
      // FIX for Vert.x
      param = param.replaceAll("\\s", "+");
    }
  }
  return param;
}

代码示例来源:origin: pmlopes/yoke

@Override
  public String handle(YokeRequest request) {
    String token = request.formAttributes().get(key);
    if (token == null) {
      token = request.params().get(key);
      if (token == null) {
        token = request.headers().get("x-csrf-token");
      }
    }
    return token;
  }
};

代码示例来源:origin: pmlopes/yoke

final MultiMap urlEncoded = request.formAttributes();

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com