Package akka.http.javadsl.model
Class HttpRequest
java.lang.Object
akka.http.javadsl.model.HttpRequest
- All Implemented Interfaces:
HttpMessage
,HttpMessage.MessageTransformations<HttpRequest>
- Direct Known Subclasses:
HttpRequest
public abstract class HttpRequest
extends Object
implements HttpMessage, HttpMessage.MessageTransformations<HttpRequest>
Represents an Http request.
-
Nested Class Summary
Nested classes/interfaces inherited from interface akka.http.javadsl.model.HttpMessage
HttpMessage.DiscardedEntity, HttpMessage.MessageTransformations<Self>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic HttpRequest
create()
Returns a default request to be modified using the `withX` methods.static HttpRequest
Returns a default request to the specified URI to be modified using the `withX` methods.static HttpRequest
A default DELETE request to be modified using the `withX` methods.abstract RequestEntity
entity()
Returns the entity of this request.static HttpRequest
A default GET request to be modified using the `withX` methods.abstract Uri
getUri()
Returns the Uri of this request.static HttpRequest
A default HEAD request to be modified using the `withX` methods.abstract HttpMethod
method()
Returns the Http method of this request.static HttpRequest
A default OPTIONS request to be modified using the `withX` methods.static HttpRequest
A default PATCH request to be modified using the `withX` methods.static HttpRequest
A default POST request to be modified using the `withX` methods.static HttpRequest
A default PUT request to be modified using the `withX` methods.abstract HttpRequest
withEntity
(RequestEntity entity) Returns a copy of this instance with a new entity.abstract HttpRequest
withMethod
(HttpMethod method) Returns a copy of this instance with a new method.abstract HttpRequest
Returns a copy of this instance with a new Uri.abstract HttpRequest
Returns a copy of this instance with a new Uri.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface akka.http.javadsl.model.HttpMessage
discardEntityBytes, discardEntityBytes, getAttribute, getHeader, getHeader, getHeaders, getHeaders, isRequest, isResponse, protocol
Methods inherited from interface akka.http.javadsl.model.HttpMessage.MessageTransformations
addAttribute, addCredentials, addHeader, addHeaders, removeAttribute, removeHeader, toStrict, toStrict, toStrict, toStrict, transformEntityDataBytes, withEntity, withEntity, withEntity, withEntity, withEntity, withEntity, withEntity, withEntity, withHeaders, withProtocol
-
Constructor Details
-
HttpRequest
public HttpRequest()
-
-
Method Details
-
method
Returns the Http method of this request. -
getUri
Returns the Uri of this request. -
entity
Returns the entity of this request.- Specified by:
entity
in interfaceHttpMessage
-
withMethod
Returns a copy of this instance with a new method. -
withUri
Returns a copy of this instance with a new Uri. -
withUri
Returns a copy of this instance with a new Uri. -
withEntity
Returns a copy of this instance with a new entity.- Specified by:
withEntity
in interfaceHttpMessage.MessageTransformations<HttpRequest>
-
create
Returns a default request to be modified using the `withX` methods. -
create
Returns a default request to the specified URI to be modified using the `withX` methods. -
GET
A default GET request to be modified using the `withX` methods. -
POST
A default POST request to be modified using the `withX` methods. -
PUT
A default PUT request to be modified using the `withX` methods. -
DELETE
A default DELETE request to be modified using the `withX` methods. -
HEAD
A default HEAD request to be modified using the `withX` methods. -
PATCH
A default PATCH request to be modified using the `withX` methods. -
OPTIONS
A default OPTIONS request to be modified using the `withX` methods.
-