本文整理了Java中org.eclipse.jetty.server.Request.getMethod
方法的一些代码示例,展示了Request.getMethod
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.getMethod
方法的具体详情如下:
包路径:org.eclipse.jetty.server.Request
类名称:Request
方法名:getMethod
暂无
代码示例来源:origin: jphp-group/jphp
@Signature
public String method() {
return request.getMethod();
}
代码示例来源:origin: AsyncHttpClient/async-http-client
final boolean expectPost = (httpRequest.getHeader("x-expect-post") != null);
if (expectGet) {
final String method = request.getMethod();
if (!"GET".equals(method)) {
httpResponse.sendError(500, "Incorrect method. Expected GET, received " + method);
return;
} else if (expectPost) {
final String method = request.getMethod();
if (!"POST".equals(method)) {
httpResponse.sendError(500, "Incorrect method. Expected POST, received " + method);
代码示例来源:origin: apache/incubator-druid
@Override
public void log(Request request, Response response)
{
if (logger.isDebugEnabled()) {
logger.debug(
"%s %s %s %s",
request.getRemoteAddr(),
request.getMethod(),
request.getHttpURI().toString(),
request.getProtocol()
);
}
}
}
代码示例来源:origin: AsyncHttpClient/async-http-client
if (request.getMethod().equalsIgnoreCase("OPTIONS")) {
httpResponse.addHeader("Allow", "GET,HEAD,POST,OPTIONS,TRACE");
代码示例来源:origin: jersey/jersey
baseUri,
requestUri,
request.getMethod(),
getSecurityContext(request),
new MapPropertiesDelegate());
代码示例来源:origin: org.eclipse.jetty/jetty-security
String httpMethod = request.getMethod();
RoleInfo roleInfo = mappings.get(httpMethod);
if (roleInfo == null)
代码示例来源:origin: i2p/i2p.i2p
buf.append(request.getMethod());
buf.append(' ');
if (responseLength == 0 && status == 200 && !"HEAD".equals(request.getMethod()))
responseLength = response.getLongContentLength();
if (responseLength >=0)
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
@Override
public String toString()
{
return (_handled?"[":"(") + getMethod() + " " + _uri + (_handled?"]@":")@") + hashCode() + " " + super.toString();
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public String toString()
{
return (_handled?"[":"(") + getMethod() + " " + _uri + (_handled?"]@":")@") + hashCode() + " " + super.toString();
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
@Override
public String toString()
{
return (_handled?"[":"(") + getMethod() + " " + _uri + (_handled?"]@":")@") + hashCode() + " " + super.toString();
}
代码示例来源:origin: sonian/elasticsearch-jetty
protected Object prepareConstraintInfo(String pathInContext, Request request) {
String httpMethod = request.getMethod();
RestPathMap<RoleInfo> mappings = constraintMap.get(httpMethod);
if (mappings != null) {
RoleInfo roleInfo = mappings.match(pathInContext);
if (roleInfo != null) {
return roleInfo;
}
}
return defaultRoleInfo;
}
代码示例来源:origin: kiegroup/droolsjbpm-integration
@Override
public void handle( Request request, HttpServletResponse response ) {
method.set(request.getMethod());
response.setStatus(HTTP_OK);
}
};
代码示例来源:origin: kiegroup/droolsjbpm-integration
@Override
public void handle( Request request, HttpServletResponse response ) {
method.set(request.getMethod());
response.setStatus(HTTP_CREATED);
}
};
代码示例来源:origin: kiegroup/droolsjbpm-integration
@Override
public void handle( Request request, HttpServletResponse response ) {
method.set(request.getMethod());
response.setStatus(HTTP_CREATED);
}
};
代码示例来源:origin: Nextdoor/bender
@Override
public void earlyEOF()
{
// If we have no request yet, just close
if (getRequest().getMethod()==null)
close();
else
super.earlyEOF();
}
代码示例来源:origin: kiegroup/droolsjbpm-integration
@Override
public void handle( Request request, HttpServletResponse response ) {
method.set(request.getMethod());
outputParams.put("name", request.getParameter("name"));
outputParams.put("number", request.getParameter("number"));
response.setStatus(HTTP_OK);
}
};
代码示例来源:origin: kiegroup/droolsjbpm-integration
@Override
public void handle( Request request, HttpServletResponse response ) {
method.set(request.getMethod());
outputParams.put("name", request.getParameter("name"));
outputParams.put("number", request.getParameter("number"));
response.setStatus(HTTP_OK);
}
};
代码示例来源:origin: kiegroup/droolsjbpm-integration
@Override
public void handle( Request request, HttpServletResponse response ) {
method.set(request.getMethod());
outputParams.put("name", request.getParameter("name"));
outputParams.put("number", request.getParameter("number"));
response.setStatus(HTTP_OK);
}
};
代码示例来源:origin: kiegroup/droolsjbpm-integration
@Override
public void handle( Request request, HttpServletResponse response ) {
method.set(request.getMethod());
outputParams.put("name", request.getParameter("name"));
outputParams.put("number", request.getParameter("number"));
response.setStatus(HTTP_OK);
}
};
代码示例来源:origin: com.teradata.airlift/http-server
@Override
public void log(Request request, Response response)
{
Duration requestTime = new Duration(max(0, System.currentTimeMillis() - request.getTimeStamp()), TimeUnit.MILLISECONDS);
long dispatchTime = request.getTimeStamp();
Duration schedulingDelay = new Duration(max(0, dispatchTime - request.getTimeStamp()), TimeUnit.MILLISECONDS);
stats.record(request.getMethod(), response.getStatus(), request.getContentRead(), response.getContentCount(), schedulingDelay, requestTime);
}
}
内容来源于网络,如有侵权,请联系作者删除!