- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.method()
方法的一些代码示例,展示了YokeRequest.method()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YokeRequest.method()
方法的具体详情如下:
包路径:com.jetdrone.vertx.yoke.middleware.YokeRequest
类名称:YokeRequest
方法名:method
暂无
代码示例来源:origin: pmlopes/yoke
@Override
public String getRequestMethod() {
return request.method().name();
}
代码示例来源:origin: pmlopes/yoke
private boolean isPreflightRequest(final YokeRequest request)
{
return OPTIONS.name().equals(request.method())
&& (request.getHeader(ACCESS_CONTROL_REQUEST_HEADERS) != null || request.getHeader(ACCESS_CONTROL_REQUEST_METHOD) != null);
}
代码示例来源:origin: pmlopes/yoke
@Override
public void handle(@NotNull final YokeRequest request, @NotNull final Handler<Object> next) {
String token = request.get(key);
// generate CSRF token
if (token == null) {
token = UUID.randomUUID().toString();
request.put(key, token);
}
// ignore these methods
if (HttpMethod.GET.equals(request.method()) || HttpMethod.HEAD.equals(request.method()) || HttpMethod.OPTIONS.equals(request.method())) {
next.handle(null);
return;
}
// expect multipart
request.setExpectMultipart(true);
// determine value
String val = valueHandler.handle(request);
// check
if (!token.equals(val)) {
next.handle(403);
return;
}
// OK
next.handle(null);
}
代码示例来源:origin: pmlopes/yoke
@Override
public void handle(@NotNull final YokeRequest request, @NotNull final Handler<Object> next) {
if (!HttpMethod.GET.equals(request.method()) && !HttpMethod.HEAD.equals(request.method())) {
next.handle(null);
} else {
代码示例来源:origin: pmlopes/yoke
@Override
public void handle(@NotNull final YokeRequest request, @NotNull final Handler<Object> next) {
final HttpMethod method = request.method();
final YokeResponse response = request.response();
代码示例来源:origin: pmlopes/yoke
if (HttpMethod.GET != request.method() && HttpMethod.HEAD != request.method() && HttpMethod.OPTIONS != request.method()) {
代码示例来源:origin: pmlopes/yoke
@Override
public void handle(@NotNull final YokeRequest request, @NotNull final Handler<Object> next) {
// common logging data
final long timestamp = System.currentTimeMillis();
final String remoteClient = getClientAddress(request.remoteAddress());
final HttpMethod method = request.method();
final String uri = request.uri();
final String version = getVersionString(request.version());
if (immediate) {
log(request, timestamp, remoteClient, version, method.name(), uri);
} else {
request.response().endHandler(new Handler<Void>() {
@Override
public void handle(Void event) {
log(request, timestamp, remoteClient, version, method.name(), uri);
}
});
}
next.handle(null);
}
}
代码示例来源:origin: pmlopes/yoke
final HttpMethod method = request.method();
代码示例来源:origin: pmlopes/yoke
String token = null;
if (HttpMethod.OPTIONS.equals(request.method()) && request.getHeader("access-control-request-headers") != null) {
for (String ctrlReq : request.getHeader("access-control-request-headers").split(",")) {
if (ctrlReq.contains("authorization")) {
代码示例来源:origin: pmlopes/yoke
@Override
public void handle(@NotNull final YokeRequest request, @NotNull final Handler<Object> next) {
if (request.path().equals(loginURI)) {
if (HttpMethod.GET.equals(request.method())) {
if (loginTemplate != null) {
if (HttpMethod.POST.equals(request.method())) {
if (forceSSL && !request.isSSL()) {
if (HttpMethod.GET.equals(request.method())) {
代码示例来源:origin: pmlopes/yoke
@Override
public void handle(@NotNull final YokeRequest request, @NotNull final Handler<Object> next) {
switch (request.method()) {
case GET:
route(request, next, getBindings);
代码示例来源:origin: pmlopes/yoke
final HttpClient client = vertx().createHttpClient(new HttpClientOptions().setDefaultHost(host).setDefaultPort(port).setSsl(secure));
final HttpClientRequest cReq = client.request(req.method(), newUri, new Handler<HttpClientResponse>() {
public void handle(HttpClientResponse cRes) {
req.response().setStatusCode(cRes.statusCode());
代码示例来源:origin: pmlopes/yoke
/**
* Write a file into the response body
*
* @param request
* @param file
* @param props
*/
private void sendFile(final YokeRequest request, final String file, final FileProps props) {
// write content type
String contentType = MimeType.getMime(file);
String charset = MimeType.getCharset(contentType);
request.response().setContentType(contentType, charset);
request.response().putHeader("Content-Length", Long.toString(props.size()));
// head support
if (HttpMethod.HEAD.equals(request.method())) {
request.response().end();
} else {
request.response().sendFile(file);
}
}
本文整理了Java中com.jetdrone.vertx.yoke.Yoke.security()方法的一些代码示例,展示了Yoke.security()的具体用法。这些代码示例主要来源于Github
本文整理了Java中com.jetdrone.vertx.yoke.Yoke.()方法的一些代码示例,展示了Yoke.()的具体用法。这些代码示例主要来源于Github/Stackoverflow/M
本文整理了Java中com.jetdrone.vertx.yoke.Yoke.vertx()方法的一些代码示例,展示了Yoke.vertx()的具体用法。这些代码示例主要来源于Github/Stack
本文整理了Java中com.jetdrone.vertx.yoke.Yoke.use()方法的一些代码示例,展示了Yoke.use()的具体用法。这些代码示例主要来源于Github/Stackover
本文整理了Java中com.jetdrone.vertx.yoke.Yoke.listen()方法的一些代码示例,展示了Yoke.listen()的具体用法。这些代码示例主要来源于Github/Sta
本文整理了Java中com.jetdrone.vertx.yoke.Yoke类的一些代码示例,展示了Yoke类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平
本文整理了Java中com.jetdrone.vertx.yoke.YokeSecurity类的一些代码示例,展示了YokeSecurity类的具体用法。这些代码示例主要来源于Github/Stack
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeResponse类的一些代码示例,展示了YokeResponse类的具体用法。这些代码示例主要来源于G
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest类的一些代码示例,展示了YokeRequest类的具体用法。这些代码示例主要来源于Git
本文整理了Java中com.jetdrone.vertx.yoke.core.YokeAsyncResult类的一些代码示例,展示了YokeAsyncResult类的具体用法。这些代码示例主要来源于G
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeResponse.putHeader()方法的一些代码示例,展示了YokeResponse.putHe
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeResponse.redirect()方法的一些代码示例,展示了YokeResponse.redire
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeResponse.end()方法的一些代码示例,展示了YokeResponse.end()的具体用法。
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeResponse.setContentType()方法的一些代码示例,展示了YokeResponse.
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeResponse.headers()方法的一些代码示例,展示了YokeResponse.headers
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeResponse.setStatusCode()方法的一些代码示例,展示了YokeResponse.s
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeResponse.setStatusMessage()方法的一些代码示例,展示了YokeRespons
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.formAttributes()方法的一些代码示例,展示了YokeRequest.fo
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.method()方法的一些代码示例,展示了YokeRequest.method()的具
本文整理了Java中com.jetdrone.vertx.yoke.middleware.YokeRequest.getHeader()方法的一些代码示例,展示了YokeRequest.getHead
我是一名优秀的程序员,十分优秀!