Package akka.http.scaladsl.model
Class HttpMethod
- java.lang.Object
-
- akka.http.javadsl.model.HttpMethod
-
- akka.http.scaladsl.model.HttpMethod
-
- All Implemented Interfaces:
Renderable
,SingletonValueRenderable
,java.io.Serializable
,scala.Equals
,scala.Product
public final class HttpMethod extends HttpMethod implements SingletonValueRenderable, scala.Product, java.io.Serializable
The method of an HTTP request. param: isSafe true if the resource should not be altered on the server param: isIdempotent true if requests can be safely (& automatically) repeated param: requestEntityAcceptance Expected if meaning of request entities is properly defined- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description HttpMethod(java.lang.String value, boolean isSafe, boolean isIdempotent, RequestEntityAcceptance requestEntityAcceptance)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static HttpMethod
custom(java.lang.String name)
Creates a custom method by name and assumes properties conservatively to be safe = false, idempotent = false and requestEntityAcceptance = Expected.static HttpMethod
custom(java.lang.String name, boolean safe, boolean idempotent, RequestEntityAcceptance requestEntityAcceptance)
boolean
isEntityAccepted()
Returns if requests with this method may contain an entity.boolean
isIdempotent()
Returns if this method is "idempotent" as defined in http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-26#section-4.2.2boolean
isSafe()
Returns if this method is "safe" as defined in http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-26#section-4.2.1RequestEntityAcceptance
requestEntityAcceptance()
java.lang.String
toString()
java.lang.String
value()
Returns the name of the method.-
Methods inherited from class akka.http.javadsl.model.HttpMethod
name
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface scala.Product
productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
-
Methods inherited from interface akka.http.impl.util.SingletonValueRenderable
render
-
-
-
-
Constructor Detail
-
HttpMethod
public HttpMethod(java.lang.String value, boolean isSafe, boolean isIdempotent, RequestEntityAcceptance requestEntityAcceptance)
-
-
Method Detail
-
custom
public static HttpMethod custom(java.lang.String name, boolean safe, boolean idempotent, RequestEntityAcceptance requestEntityAcceptance)
-
custom
public static HttpMethod custom(java.lang.String name)
Creates a custom method by name and assumes properties conservatively to be safe = false, idempotent = false and requestEntityAcceptance = Expected.- Parameters:
name
- (undocumented)- Returns:
- (undocumented)
-
value
public java.lang.String value()
Description copied from class:HttpMethod
Returns the name of the method.- Specified by:
value
in interfaceSingletonValueRenderable
- Specified by:
value
in classHttpMethod
-
isSafe
public boolean isSafe()
Description copied from class:HttpMethod
Returns if this method is "safe" as defined in http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-26#section-4.2.1- Specified by:
isSafe
in classHttpMethod
-
isIdempotent
public boolean isIdempotent()
Description copied from class:HttpMethod
Returns if this method is "idempotent" as defined in http://tools.ietf.org/html/draft-ietf-httpbis-p2-semantics-26#section-4.2.2- Specified by:
isIdempotent
in classHttpMethod
-
requestEntityAcceptance
public RequestEntityAcceptance requestEntityAcceptance()
-
isEntityAccepted
public boolean isEntityAccepted()
Description copied from class:HttpMethod
Returns if requests with this method may contain an entity.- Specified by:
isEntityAccepted
in classHttpMethod
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-