本文整理了Java中org.apache.coyote.Request.method
方法的一些代码示例,展示了Request.method
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Request.method
方法的具体详情如下:
包路径:org.apache.coyote.Request
类名称:Request
方法名:method
暂无
代码示例来源:origin: line/armeria
coyoteReq.method().setString(method.name());
代码示例来源:origin: line/armeria
private static HttpHeaders convertResponse(Response coyoteRes) {
final HttpHeaders headers = HttpHeaders.of(HttpStatus.valueOf(coyoteRes.getStatus()));
final String contentType = coyoteRes.getContentType();
if (contentType != null && !contentType.isEmpty()) {
headers.set(HttpHeaderNames.CONTENT_TYPE, contentType);
}
final long contentLength = coyoteRes.getBytesWritten(true); // 'true' will trigger flush.
final String method = coyoteRes.getRequest().method().toString();
if (!"HEAD".equals(method)) {
headers.setLong(HttpHeaderNames.CONTENT_LENGTH, contentLength);
}
final MimeHeaders cHeaders = coyoteRes.getMimeHeaders();
final int numHeaders = cHeaders.size();
for (int i = 0; i < numHeaders; i++) {
final AsciiString name = toHeaderName(cHeaders.getName(i));
if (name == null) {
continue;
}
final String value = toHeaderValue(cHeaders.getValue(i));
if (value == null) {
continue;
}
headers.add(name.toLowerCase(), value);
}
return headers;
}
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
/**
* @return the HTTP request method used in this Request.
*/
@Override
public String getMethod() {
return coyoteRequest.method().toString();
}
代码示例来源:origin: codefollower/Tomcat-Research
/**
* Return the HTTP request method used in this Request.
*/
@Override
public String getMethod() {
return coyoteRequest.method().toString();
}
代码示例来源:origin: tomcat/catalina
/**
* Return the HTTP request method used in this Request.
*/
public String getMethod() {
return coyoteRequest.method().toString();
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Return the HTTP request method used in this Request.
*/
public String getMethod() {
return coyoteRequest.method().toString();
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Return the HTTP request method used in this Request.
*/
@Override
public String getMethod() {
return coyoteRequest.method().toString();
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
/**
* @return the HTTP request method used in this Request.
*/
@Override
public String getMethod() {
return coyoteRequest.method().toString();
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Return the HTTP request method used in this Request.
*/
@Override
public String getMethod() {
return coyoteRequest.method().toString();
}
代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib
/* */ public String getMethod()
/* */ {
/* 1902 */ return this.coyoteRequest.method().toString();
/* */ }
/* */
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Return the HTTP request method used in this Request.
*/
@Override
public String getMethod() {
return coyoteRequest.method().toString();
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Return the HTTP request method used in this Request.
*/
@Override
public String getMethod() {
return coyoteRequest.method().toString();
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Return the HTTP request method used in this Request.
*/
public String getMethod() {
return coyoteRequest.method().toString();
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Return the HTTP request method used in this Request.
*/
@Override
public String getMethod() {
return coyoteRequest.method().toString();
}
代码示例来源:origin: codefollower/Tomcat-Research
public String getMethod() {
return req.method().toString();
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
public String getMethod() {
return req.method().toString();
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
public String getMethod() {
return req.method().toString();
}
代码示例来源:origin: org.jboss.web/jbossweb
public String getMethod() {
return req.method().toString();
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
public String getMethod() {
return req.method().toString();
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
private Request cloneRequest(Request source) throws IOException {
Request dest = new Request();
// Transfer the minimal information required for the copy of the Request
// that is passed to the HTTP upgrade process
dest.decodedURI().duplicate(source.decodedURI());
dest.method().duplicate(source.method());
dest.getMimeHeaders().duplicate(source.getMimeHeaders());
dest.requestURI().duplicate(source.requestURI());
return dest;
}
private boolean handleIncompleteRequestLineRead() {
内容来源于网络,如有侵权,请联系作者删除!