akka.http.model

HttpRequest

final case class HttpRequest(method: HttpMethod = HttpMethods.GET, uri: Uri = Uri./, headers: Seq[HttpHeader] = immutable.this.Nil, entity: RequestEntity = HttpEntity.Empty, protocol: HttpProtocol = HttpProtocols.HTTP/1.1) extends model.japi.HttpRequest with HttpMessage with Product with Serializable

The immutable model HTTP request model.

Source
HttpMessage.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, HttpMessage, japi.HttpRequest, japi.HttpMessage.MessageTransformations[japi.HttpRequest], japi.HttpMessage, AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HttpRequest
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. HttpMessage
  7. HttpRequest
  8. MessageTransformations
  9. HttpMessage
  10. AnyRef
  11. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HttpRequest(method: HttpMethod = HttpMethods.GET, uri: Uri = Uri./, headers: Seq[HttpHeader] = immutable.this.Nil, entity: RequestEntity = HttpEntity.Empty, protocol: HttpProtocol = HttpProtocols.HTTP/1.1)

Type Members

  1. type MessageTransformations[Self] = japi.HttpMessage.MessageTransformations[Self]

    Attributes
    protected
    Definition Classes
    HttpMessage
  2. type Self = HttpRequest

    Definition Classes
    HttpRequestHttpMessage

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from HttpRequest to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (HttpRequest, B)

    Implicit information
    This member is added by an implicit conversion from HttpRequest to ArrowAssoc[HttpRequest] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. def acceptedCharsetRanges: Seq[HttpCharsetRange]

    The charset-ranges accepted by the client according to the Accept-Charset request header.

    The charset-ranges accepted by the client according to the Accept-Charset request header. The returned ranges are sorted by decreasing q-value.

  9. def acceptedEncodingRanges: Seq[HttpEncodingRange]

    The encoding-ranges accepted by the client according to the Accept-Encoding request header.

    The encoding-ranges accepted by the client according to the Accept-Encoding request header. The returned ranges are sorted by decreasing q-value.

  10. def acceptedMediaRanges: Seq[MediaRange]

    The media-ranges accepted by the client according to the Accept request header.

    The media-ranges accepted by the client according to the Accept request header. The returned ranges are sorted by decreasing q-value.

  11. def addHeader(header: japi.HttpHeader): Self

    Definition Classes
    HttpMessage
  12. def addHeaders(headers: Iterable[japi.HttpHeader]): Self

    Java API

    Java API

    Definition Classes
    HttpMessage
  13. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  14. def canBeRetried: Boolean

    Determines whether this request can be safely retried, which is the case only of the request method is idempotent.

  15. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  16. def connectionCloseExpected: Boolean

    Returns true if this message is an:

    Returns true if this message is an:

    • HttpRequest and the client does not want to reuse the connection after the response for this request has been received
    • HttpResponse and the server will close the connection after this response
    Definition Classes
    HttpMessage
  17. def cookies: Seq[HttpCookie]

    All cookies provided by the client in one or more Cookie headers.

  18. def effectiveUri(securedConnection: Boolean, defaultHostHeader: Host = Host.empty): Uri

    Resolve this request's URI according to the logic defined at http://tools.

    Resolve this request's URI according to the logic defined at http://tools.ietf.org/html/rfc7230#section-5.5

  19. def encoding: HttpEncoding

    The content encoding as specified by the Content-Encoding header.

    The content encoding as specified by the Content-Encoding header. If no Content-Encoding header is present the default value 'identity' is returned.

    Definition Classes
    HttpMessage
  20. def ensuring(cond: (HttpRequest) ⇒ Boolean, msg: ⇒ Any): HttpRequest

    Implicit information
    This member is added by an implicit conversion from HttpRequest to Ensuring[HttpRequest] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  21. def ensuring(cond: (HttpRequest) ⇒ Boolean): HttpRequest

    Implicit information
    This member is added by an implicit conversion from HttpRequest to Ensuring[HttpRequest] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  22. def ensuring(cond: Boolean, msg: ⇒ Any): HttpRequest

    Implicit information
    This member is added by an implicit conversion from HttpRequest to Ensuring[HttpRequest] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  23. def ensuring(cond: Boolean): HttpRequest

    Implicit information
    This member is added by an implicit conversion from HttpRequest to Ensuring[HttpRequest] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  24. val entity: RequestEntity

    Definition Classes
    HttpRequestHttpMessageHttpRequestHttpMessage
  25. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  26. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  27. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from HttpRequest to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  28. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  29. def getHeader(headerName: String): Option[japi.HttpHeader]

    Java API

    Java API

    Definition Classes
    HttpMessageHttpMessage
  30. def getHeader[T <: japi.HttpHeader](headerClass: Class[T]): Option[T]

    Java API

    Java API

    Definition Classes
    HttpMessageHttpMessage
  31. def getHeaders(): Iterable[japi.HttpHeader]

    Java API

    Java API

    Definition Classes
    HttpMessageHttpMessage
  32. def getUri(): japi.Uri

    Java API

    Java API

    Definition Classes
    HttpRequestHttpRequest
  33. def header[T <: japi.HttpHeader](implicit arg0: ClassTag[T]): Option[T]

    Returns the first header of the given type if there is one

    Returns the first header of the given type if there is one

    Definition Classes
    HttpMessage
  34. val headers: Seq[HttpHeader]

    Definition Classes
    HttpRequestHttpMessage
  35. def isCharsetAccepted(charset: HttpCharset, ranges: Seq[HttpCharsetRange] = acceptedCharsetRanges): Boolean

    Determines whether the given charset is accepted by the client.

  36. def isEncodingAccepted(encoding: HttpEncoding, ranges: Seq[HttpEncodingRange] = acceptedEncodingRanges): Boolean

    Determines whether the given encoding is accepted by the client.

  37. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  38. def isMediaTypeAccepted(mediaType: MediaType, ranges: Seq[MediaRange] = acceptedMediaRanges): Boolean

    Determines whether the given media-type is accepted by the client.

  39. def isRequest(): Boolean

    Definition Classes
    HttpRequestHttpMessageHttpMessage
  40. def isResponse(): Boolean

    Definition Classes
    HttpRequestHttpMessageHttpMessage
  41. def mapEntity(f: (RequestEntity) ⇒ RequestEntity): HttpRequest

  42. def mapEntity(f: (HttpEntity) ⇒ MessageEntity): Self

    Returns a copy of this message with the entity transformed by the given function

    Returns a copy of this message with the entity transformed by the given function

    Definition Classes
    HttpMessage
  43. def mapHeaders(f: (Seq[HttpHeader]) ⇒ Seq[HttpHeader]): Self

    Returns a copy of this message with the list of headers transformed by the given function

    Returns a copy of this message with the list of headers transformed by the given function

    Definition Classes
    HttpMessage
  44. val method: HttpMethod

    Definition Classes
    HttpRequestHttpRequest
  45. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  46. final def notify(): Unit

    Definition Classes
    AnyRef
  47. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  48. val protocol: HttpProtocol

    Definition Classes
    HttpRequestHttpMessageHttpMessage
  49. def qValueForCharset(charset: HttpCharset, ranges: Seq[HttpCharsetRange] = acceptedCharsetRanges): Float

    Returns the q-value that the client (implicitly or explicitly) attaches to the given charset.

  50. def qValueForEncoding(encoding: HttpEncoding, ranges: Seq[HttpEncodingRange] = acceptedEncodingRanges): Float

    Returns the q-value that the client (implicitly or explicitly) attaches to the given encoding.

  51. def qValueForMediaType(mediaType: MediaType, ranges: Seq[MediaRange] = acceptedMediaRanges): Float

    Returns the q-value that the client (implicitly or explicitly) attaches to the given media-type.

  52. def removeHeader(headerName: String): Self

    Removes the header with the given name (case-insensitive)

    Removes the header with the given name (case-insensitive)

    Definition Classes
    HttpMessage
  53. def self: HttpRequest

    Definition Classes
    HttpRequestHttpMessage
  54. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  55. def toStrict(timeout: FiniteDuration)(implicit ec: ExecutionContext, fm: FlowMaterializer): Future[Self]

    Returns a sharable and serializable copy of this message with a strict entity.

    Returns a sharable and serializable copy of this message with a strict entity.

    Definition Classes
    HttpMessage
  56. val uri: Uri

  57. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  59. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  60. def withDefaultHeaders(defaultHeaders: Seq[HttpHeader]): Self

    Returns a new message that contains all of the given default headers which didn't already exist (by case-insensitive header name) in this message.

    Returns a new message that contains all of the given default headers which didn't already exist (by case-insensitive header name) in this message.

    Definition Classes
    HttpMessage
  61. def withEffectiveUri(securedConnection: Boolean, defaultHostHeader: Host = Host.empty): HttpRequest

    Returns a copy of this request with the URI resolved according to the logic defined at http://tools.

    Returns a copy of this request with the URI resolved according to the logic defined at http://tools.ietf.org/html/rfc7230#section-5.5

  62. def withEntity(entity: MessageEntity): HttpRequest

    Returns a copy of this message with the entity set to the given one.

    Returns a copy of this message with the entity set to the given one.

    Definition Classes
    HttpRequestHttpMessage
  63. def withEntity(entity: japi.RequestEntity): HttpRequest

    Definition Classes
    HttpRequestHttpRequest → MessageTransformations
  64. def withEntity(contentType: japi.ContentType, file: File): Self

    Definition Classes
    HttpMessage
  65. def withEntity(contentType: japi.ContentType, bytes: ByteString): Self

    Definition Classes
    HttpMessage
  66. def withEntity(contentType: japi.ContentType, bytes: Array[Byte]): Self

    Definition Classes
    HttpMessage
  67. def withEntity(contentType: japi.ContentType, string: String): Self

    Definition Classes
    HttpMessage
  68. def withEntity(bytes: ByteString): Self

    Definition Classes
    HttpMessage
  69. def withEntity(bytes: Array[Byte]): Self

    Definition Classes
    HttpMessage
  70. def withEntity(string: String): Self

    Definition Classes
    HttpMessage
  71. def withHeaders(headers: Seq[HttpHeader]): HttpRequest

    Returns a copy of this message with the list of headers set to the given ones.

    Returns a copy of this message with the list of headers set to the given ones.

    Definition Classes
    HttpRequestHttpMessage
  72. def withHeaders(headers: HttpHeader*): Self

    Returns a copy of this message with the list of headers set to the given ones.

    Returns a copy of this message with the list of headers set to the given ones.

    Definition Classes
    HttpMessage
  73. def withHeadersAndEntity(headers: Seq[HttpHeader], entity: RequestEntity): HttpRequest

    Returns a copy of this message with the entity and headers set to the given ones.

    Returns a copy of this message with the entity and headers set to the given ones.

    Definition Classes
    HttpRequestHttpMessage
  74. def withMethod(method: japi.HttpMethod): HttpRequest

    Definition Classes
    HttpRequestHttpRequest
  75. def withProtocol(protocol: japi.HttpProtocol): HttpRequest

    Definition Classes
    HttpRequest → MessageTransformations
  76. def withUri(relativeUri: japi.Uri): HttpRequest

    Java API

    Java API

    Definition Classes
    HttpRequestHttpRequest
  77. def withUri(uri: Uri): HttpRequest

  78. def withUri(path: String): HttpRequest

    Definition Classes
    HttpRequestHttpRequest
  79. def [B](y: B): (HttpRequest, B)

    Implicit information
    This member is added by an implicit conversion from HttpRequest to ArrowAssoc[HttpRequest] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from HttpRequest to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (httpRequest: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from HttpRequest to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (httpRequest: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: HttpRequest

    Implicit information
    This member is added by an implicit conversion from HttpRequest to ArrowAssoc[HttpRequest] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (httpRequest: ArrowAssoc[HttpRequest]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: HttpRequest

    Implicit information
    This member is added by an implicit conversion from HttpRequest to Ensuring[HttpRequest] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (httpRequest: Ensuring[HttpRequest]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from HttpMessage

Inherited from japi.HttpRequest

Inherited from japi.HttpMessage.MessageTransformations[japi.HttpRequest]

Inherited from japi.HttpMessage

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from HttpRequest to StringAdd

Inherited by implicit conversion any2stringfmt from HttpRequest to StringFormat

Inherited by implicit conversion any2ArrowAssoc from HttpRequest to ArrowAssoc[HttpRequest]

Inherited by implicit conversion any2Ensuring from HttpRequest to Ensuring[HttpRequest]

Ungrouped