Class HttpRequest


  • public class HttpRequest
    extends java.lang.Object
    Represents a "disconnected" request, i.e. containing the full payload.
    Author:
    https://github.com/lbovet [Laurent Bovet]
    • Constructor Summary

      Constructors 
      Constructor Description
      HttpRequest​(io.vertx.core.http.HttpMethod method, java.lang.String uri, io.vertx.core.MultiMap headers, byte[] payload)  
      HttpRequest​(io.vertx.core.json.JsonObject object)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      io.vertx.core.MultiMap getHeaders()  
      io.vertx.core.http.HttpMethod getMethod()  
      byte[] getPayload()  
      java.lang.String getUri()  
      void setHeaders​(io.vertx.core.MultiMap headers)  
      io.vertx.core.json.JsonObject toJsonObject()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HttpRequest

        public HttpRequest​(io.vertx.core.http.HttpMethod method,
                           java.lang.String uri,
                           io.vertx.core.MultiMap headers,
                           byte[] payload)
      • HttpRequest

        public HttpRequest​(io.vertx.core.json.JsonObject object)
        Parameters:
        object - object
        Throws:
        java.lang.IllegalArgumentException - When passed in JSON is not in expected format.
        java.lang.ClassCastException - IMO, this should be a IllegalArgumentException. Because this happens when impl tries to cast something we got from passed in JSON.
    • Method Detail

      • toJsonObject

        public io.vertx.core.json.JsonObject toJsonObject()
      • getMethod

        public io.vertx.core.http.HttpMethod getMethod()
      • getUri

        public java.lang.String getUri()
      • getPayload

        public byte[] getPayload()
      • getHeaders

        public io.vertx.core.MultiMap getHeaders()
      • setHeaders

        public void setHeaders​(io.vertx.core.MultiMap headers)