Package org.swisspush.gateleen.core.http
Class HttpRequest
- java.lang.Object
-
- org.swisspush.gateleen.core.http.HttpRequest
-
public class HttpRequest extends 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, 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.MultiMapgetHeaders()io.vertx.core.http.HttpMethodgetMethod()byte[]getPayload()StringgetUri()voidsetHeaders(io.vertx.core.MultiMap headers)io.vertx.core.json.JsonObjecttoJsonObject()
-
-
-
Constructor Detail
-
HttpRequest
public HttpRequest(io.vertx.core.http.HttpMethod method, String uri, io.vertx.core.MultiMap headers, byte[] payload)
-
HttpRequest
public HttpRequest(io.vertx.core.json.JsonObject object)
- Parameters:
object- object- Throws:
IllegalArgumentException- When passed in JSON is not in expected format.ClassCastException- IMO, this should be aIllegalArgumentException. 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 String getUri()
-
getPayload
public byte[] getPayload()
-
getHeaders
public io.vertx.core.MultiMap getHeaders()
-
setHeaders
public void setHeaders(io.vertx.core.MultiMap headers)
-
-