Class HttpRequest
- java.lang.Object
-
- com.github.nosan.embedded.cassandra.commons.web.HttpRequest
-
public class HttpRequest extends Object
Represents an HTTP request message.- Since:
- 4.0.0
- Author:
- Dmytro Nosan
-
-
Constructor Summary
Constructors Constructor Description HttpRequest(URI uri)CreatesHttpRequestwith provided uri and GET method.HttpRequest(URI uri, String method)CreatesHttpRequestwith provided uri and method.HttpRequest(URI uri, String method, HttpHeaders headers)CreatesHttpRequestwith provided uri, method and headers.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HttpHeadersgetHeaders()Gets the headers of this request.StringgetMethod()Gets the HTTP method of the request.URIgetUri()Gets the URI of the request.StringtoString()
-
-
-
Constructor Detail
-
HttpRequest
public HttpRequest(URI uri)
CreatesHttpRequestwith provided uri and GET method.- Parameters:
uri- uri of the request
-
HttpRequest
public HttpRequest(URI uri, String method)
CreatesHttpRequestwith provided uri and method.- Parameters:
uri- uri of the requestmethod- HTTP method
-
HttpRequest
public HttpRequest(URI uri, String method, HttpHeaders headers)
CreatesHttpRequestwith provided uri, method and headers.- Parameters:
uri- uri of the requestmethod- HTTP methodheaders- HTTP headers
-
-
Method Detail
-
getUri
public URI getUri()
Gets the URI of the request.- Returns:
- the URI of the request
-
getMethod
public String getMethod()
Gets the HTTP method of the request.- Returns:
- the HTTP method
-
getHeaders
public HttpHeaders getHeaders()
Gets the headers of this request.- Returns:
- a corresponding HttpHeaders object
-
-