org.apache.coyote.Request.method()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(389)

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

Request.method介绍

暂无

代码示例

代码示例来源:origin: line/armeria

  1. coyoteReq.method().setString(method.name());

代码示例来源:origin: line/armeria

  1. private static HttpHeaders convertResponse(Response coyoteRes) {
  2. final HttpHeaders headers = HttpHeaders.of(HttpStatus.valueOf(coyoteRes.getStatus()));
  3. final String contentType = coyoteRes.getContentType();
  4. if (contentType != null && !contentType.isEmpty()) {
  5. headers.set(HttpHeaderNames.CONTENT_TYPE, contentType);
  6. }
  7. final long contentLength = coyoteRes.getBytesWritten(true); // 'true' will trigger flush.
  8. final String method = coyoteRes.getRequest().method().toString();
  9. if (!"HEAD".equals(method)) {
  10. headers.setLong(HttpHeaderNames.CONTENT_LENGTH, contentLength);
  11. }
  12. final MimeHeaders cHeaders = coyoteRes.getMimeHeaders();
  13. final int numHeaders = cHeaders.size();
  14. for (int i = 0; i < numHeaders; i++) {
  15. final AsciiString name = toHeaderName(cHeaders.getName(i));
  16. if (name == null) {
  17. continue;
  18. }
  19. final String value = toHeaderValue(cHeaders.getValue(i));
  20. if (value == null) {
  21. continue;
  22. }
  23. headers.add(name.toLowerCase(), value);
  24. }
  25. return headers;
  26. }

代码示例来源:origin: org.apache.tomcat/tomcat-catalina

  1. /**
  2. * @return the HTTP request method used in this Request.
  3. */
  4. @Override
  5. public String getMethod() {
  6. return coyoteRequest.method().toString();
  7. }

代码示例来源:origin: codefollower/Tomcat-Research

  1. /**
  2. * Return the HTTP request method used in this Request.
  3. */
  4. @Override
  5. public String getMethod() {
  6. return coyoteRequest.method().toString();
  7. }

代码示例来源:origin: tomcat/catalina

  1. /**
  2. * Return the HTTP request method used in this Request.
  3. */
  4. public String getMethod() {
  5. return coyoteRequest.method().toString();
  6. }

代码示例来源:origin: jboss.web/jbossweb

  1. /**
  2. * Return the HTTP request method used in this Request.
  3. */
  4. public String getMethod() {
  5. return coyoteRequest.method().toString();
  6. }

代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina

  1. /**
  2. * Return the HTTP request method used in this Request.
  3. */
  4. @Override
  5. public String getMethod() {
  6. return coyoteRequest.method().toString();
  7. }

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

  1. /**
  2. * @return the HTTP request method used in this Request.
  3. */
  4. @Override
  5. public String getMethod() {
  6. return coyoteRequest.method().toString();
  7. }

代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9

  1. /**
  2. * Return the HTTP request method used in this Request.
  3. */
  4. @Override
  5. public String getMethod() {
  6. return coyoteRequest.method().toString();
  7. }

代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib

  1. /* */ public String getMethod()
  2. /* */ {
  3. /* 1902 */ return this.coyoteRequest.method().toString();
  4. /* */ }
  5. /* */

代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9

  1. /**
  2. * Return the HTTP request method used in this Request.
  3. */
  4. @Override
  5. public String getMethod() {
  6. return coyoteRequest.method().toString();
  7. }

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

  1. /**
  2. * Return the HTTP request method used in this Request.
  3. */
  4. @Override
  5. public String getMethod() {
  6. return coyoteRequest.method().toString();
  7. }

代码示例来源:origin: org.jboss.web/jbossweb

  1. /**
  2. * Return the HTTP request method used in this Request.
  3. */
  4. public String getMethod() {
  5. return coyoteRequest.method().toString();
  6. }

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

  1. /**
  2. * Return the HTTP request method used in this Request.
  3. */
  4. @Override
  5. public String getMethod() {
  6. return coyoteRequest.method().toString();
  7. }

代码示例来源:origin: codefollower/Tomcat-Research

  1. public String getMethod() {
  2. return req.method().toString();
  3. }

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

  1. public String getMethod() {
  2. return req.method().toString();
  3. }

代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7

  1. public String getMethod() {
  2. return req.method().toString();
  3. }

代码示例来源:origin: org.jboss.web/jbossweb

  1. public String getMethod() {
  2. return req.method().toString();
  3. }

代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina

  1. public String getMethod() {
  2. return req.method().toString();
  3. }

代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

  1. private Request cloneRequest(Request source) throws IOException {
  2. Request dest = new Request();
  3. // Transfer the minimal information required for the copy of the Request
  4. // that is passed to the HTTP upgrade process
  5. dest.decodedURI().duplicate(source.decodedURI());
  6. dest.method().duplicate(source.method());
  7. dest.getMimeHeaders().duplicate(source.getMimeHeaders());
  8. dest.requestURI().duplicate(source.requestURI());
  9. return dest;
  10. }
  11. private boolean handleIncompleteRequestLineRead() {

相关文章

Request类方法