Class HttpRequest
java.lang.Object
org.apache.pekko.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 SummaryNested classes/interfaces inherited from interface org.apache.pekko.http.javadsl.model.HttpMessageHttpMessage.DiscardedEntity, HttpMessage.MessageTransformations<Self>
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic HttpRequestcreate()Returns a default request to be modified using the `withX` methods.static HttpRequestReturns a default request to the specified URI to be modified using the `withX` methods.static HttpRequestA default DELETE request to be modified using the `withX` methods.abstract RequestEntityentity()Returns the entity of this request.static HttpRequestA default GET request to be modified using the `withX` methods.abstract UrigetUri()Returns the Uri of this request.static HttpRequestA default HEAD request to be modified using the `withX` methods.abstract HttpMethodmethod()Returns the Http method of this request.static HttpRequestA default OPTIONS request to be modified using the `withX` methods.static HttpRequestA default PATCH request to be modified using the `withX` methods.static HttpRequestA default POST request to be modified using the `withX` methods.static HttpRequestA default PUT request to be modified using the `withX` methods.abstract HttpRequestwithEntity(RequestEntity entity) Returns a copy of this instance with a new entity.abstract HttpRequestwithMethod(HttpMethod method) Returns a copy of this instance with a new method.abstract HttpRequestReturns a copy of this instance with a new Uri.abstract HttpRequestReturns a copy of this instance with a new Uri.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pekko.http.javadsl.model.HttpMessagediscardEntityBytes, discardEntityBytes, getAttribute, getHeader, getHeader, getHeaders, getHeaders, isRequest, isResponse, protocolMethods inherited from interface org.apache.pekko.http.javadsl.model.HttpMessage.MessageTransformationsaddAttribute, addCredentials, addHeader, addHeaders, removeAttribute, removeHeader, toStrict, toStrict, toStrict, toStrict, transformEntityDataBytes, withEntity, withEntity, withEntity, withEntity, withEntity, withEntity, withEntity, withEntity, withHeaders, withProtocol
- 
Constructor Details- 
HttpRequestpublic HttpRequest()
 
- 
- 
Method Details- 
methodReturns the Http method of this request.
- 
getUriReturns the Uri of this request.
- 
entityReturns the entity of this request.- Specified by:
- entityin interface- HttpMessage
 
- 
withMethodReturns a copy of this instance with a new method.
- 
withUriReturns a copy of this instance with a new Uri.
- 
withUriReturns a copy of this instance with a new Uri.
- 
withEntityReturns a copy of this instance with a new entity.- Specified by:
- withEntityin interface- HttpMessage.MessageTransformations<HttpRequest>
 
- 
createReturns a default request to be modified using the `withX` methods.
- 
createReturns a default request to the specified URI to be modified using the `withX` methods.
- 
GETA default GET request to be modified using the `withX` methods.
- 
POSTA default POST request to be modified using the `withX` methods.
- 
PUTA default PUT request to be modified using the `withX` methods.
- 
DELETEA default DELETE request to be modified using the `withX` methods.
- 
HEADA default HEAD request to be modified using the `withX` methods.
- 
PATCHA default PATCH request to be modified using the `withX` methods.
- 
OPTIONSA default OPTIONS request to be modified using the `withX` methods.
 
-