本文整理了Java中org.jooby.Request.params
方法的一些代码示例,展示了Request.params
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.params
方法的具体详情如下:
包路径:org.jooby.Request
类名称:Request
方法名:params
[英]Short version of params().to(type)
.
[中][$0$]的短版本。
代码示例来源:origin: jooby-project/jooby
@Override
public Mutant params(final String... xss) {
return req.params(xss);
}
代码示例来源:origin: jooby-project/jooby
@Override
public <T> T params(final Class<T> type, final String... xss) {
return req.params(type, xss);
}
代码示例来源:origin: jooby-project/jooby
@Override
public <T> T params(final Class<T> type) {
return req.params(type);
}
代码示例来源:origin: jooby-project/jooby
@Override
public Mutant params() {
return req.params();
}
代码示例来源:origin: jooby-project/jooby
/**
* Short version of <code>params().to(type)</code>.
*
* @param type Object type.
* @param <T> Value type.
* @return Instance of object.
*/
@Nonnull
default <T> T params(final Class<T> type) {
return params().to(type);
}
代码示例来源:origin: jooby-project/jooby
/**
* Short version of <code>params(xss).to(type)</code>.
*
* @param type Object type.
* @param xss Xss filter to apply.
* @param <T> Value type.
* @return Instance of object.
*/
@Nonnull
default <T> T params(final Class<T> type, final String... xss) {
return params(xss).to(type);
}
代码示例来源:origin: jooby-project/jooby
/**
* Short version of <code>params(xss).to(type)</code>.
*
* @param type Object type.
* @param xss Xss filter to apply.
* @param <T> Value type.
* @return Instance of object.
*/
@Nonnull
default <T> T form(final Class<T> type, final String... xss) {
return params(xss).to(type);
}
代码示例来源:origin: jooby-project/jooby
/**
* Short version of <code>params().to(type)</code>.
*
* @param type Object type.
* @param <T> Value type.
* @return Instance of object.
*/
@Nonnull
default <T> T form(final Class<T> type) {
return params().to(type);
}
代码示例来源:origin: jooby-project/jooby
private Map<String, String[]> params(final Request req) {
ImmutableMap.Builder<String, String[]> result = ImmutableMap.<String, String[]>builder();
req.params().toMap().forEach((name, value) -> {
try {
List<String> values = value.toList();
result.put(name, values.toArray(new String[values.size()]));
} catch (Err ignored) {
log.debug("ignoring HTTP param: " + name, ignored);
}
});
return result.build();
}
代码示例来源:origin: jooby-project/jooby
private static Map<String, String[]> params(final Request req) {
ImmutableMap.Builder<String, String[]> result = ImmutableMap.<String, String[]>builder();
req.params().toMap().forEach((name, value) -> {
try {
List<String> values = value.toList();
result.put(name, values.toArray(new String[values.size()]));
} catch (Err ignored) {
LoggerFactory.getLogger(Pac4jContext.class).debug("ignoring HTTP param: " + name, ignored);
}
});
return result.build();
}
}
代码示例来源:origin: jooby-project/jooby
}));
envdata.put("request params", dump(() -> req.params().toMap()));
代码示例来源:origin: jooby-project/jooby
private static final GetValue param() {
return (req, rsp, chain, param) -> {
Mutant mutant = req.param(param.name);
if (mutant.isSet() || param.optional) {
return mutant.to(param.type);
}
try {
return req.params().to(param.type);
} catch (Err ex) {
// force parsing
return mutant.to(param.type);
}
};
}
}
代码示例来源:origin: org.jooby/jooby
@Override
public Mutant params() {
return req.params();
}
代码示例来源:origin: org.jooby/jooby
@Override
public Mutant params(final String... xss) {
return req.params(xss);
}
代码示例来源:origin: org.jooby/jooby
@Override
public <T> T params(final Class<T> type, final String... xss) {
return req.params(type, xss);
}
代码示例来源:origin: org.jooby/jooby
/**
* Short version of <code>params().to(type)</code>.
*
* @param type Object type.
* @param <T> Value type.
* @return Instance of object.
*/
@Nonnull
default <T> T form(final Class<T> type) {
return params().to(type);
}
代码示例来源:origin: org.jooby/jooby
/**
* Short version of <code>params(xss).to(type)</code>.
*
* @param type Object type.
* @param xss Xss filter to apply.
* @param <T> Value type.
* @return Instance of object.
*/
@Nonnull
default <T> T params(final Class<T> type, final String... xss) {
return params(xss).to(type);
}
代码示例来源:origin: org.jooby/jooby
/**
* Short version of <code>params(xss).to(type)</code>.
*
* @param type Object type.
* @param xss Xss filter to apply.
* @param <T> Value type.
* @return Instance of object.
*/
@Nonnull
default <T> T form(final Class<T> type, final String... xss) {
return params(xss).to(type);
}
代码示例来源:origin: org.jooby/jooby
/**
* Short version of <code>params().to(type)</code>.
*
* @param type Object type.
* @param <T> Value type.
* @return Instance of object.
*/
@Nonnull
default <T> T params(final Class<T> type) {
return params().to(type);
}
代码示例来源:origin: org.jooby/jooby-pac4j
private Map<String, String[]> params(final Request req) {
ImmutableMap.Builder<String, String[]> result = ImmutableMap.<String, String[]>builder();
req.params().toMap().forEach((name, value) -> {
try {
List<String> values = value.toList();
result.put(name, values.toArray(new String[values.size()]));
} catch (Err ignored) {
log.debug("ignoring HTTP param: " + name, ignored);
}
});
return result.build();
}
内容来源于网络,如有侵权,请联系作者删除!