akka.http.scaladsl.model

HttpResponse

final case class HttpResponse(status: StatusCode = StatusCodes.OK, headers: Seq[HttpHeader] = immutable.this.Nil, entity: ResponseEntity = HttpEntity.Empty, protocol: HttpProtocol = HttpProtocols.HTTP/1.1) extends javadsl.model.HttpResponse with HttpMessage with Product with Serializable

The immutable HTTP response model.

Source
HttpMessage.scala
Linear Supertypes
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HttpResponse
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. HttpMessage
  7. HttpResponse
  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 HttpResponse(status: StatusCode = StatusCodes.OK, headers: Seq[HttpHeader] = immutable.this.Nil, entity: ResponseEntity = HttpEntity.Empty, protocol: HttpProtocol = HttpProtocols.HTTP/1.1)

Type Members

  1. type MessageTransformations[Self] = javadsl.model.HttpMessage.MessageTransformations[Self]

    Attributes
    protected
    Definition Classes
    HttpMessage
  2. type Self = HttpResponse

    Definition Classes
    HttpResponseHttpMessage

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 HttpResponse to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (HttpResponse, B)

    Implicit information
    This member is added by an implicit conversion from HttpResponse to ArrowAssoc[HttpResponse] 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 addHeader(header: javadsl.model.HttpHeader): Self

    Definition Classes
    HttpMessage
  9. def addHeaders(headers: Iterable[javadsl.model.HttpHeader]): Self

    Java API

    Java API

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

    Definition Classes
    Any
  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. 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
  13. 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
  14. def ensuring(cond: (HttpResponse) ⇒ Boolean, msg: ⇒ Any): HttpResponse

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

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

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

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

    Definition Classes
    HttpResponseHttpMessageHttpResponseHttpMessage
  19. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  23. def getHeader(headerName: String): Option[javadsl.model.HttpHeader]

    Java API

    Java API

    Definition Classes
    HttpMessageHttpMessage
  24. def getHeader[T <: javadsl.model.HttpHeader](headerClass: Class[T]): Option[T]

    Java API

    Java API

    Definition Classes
    HttpMessageHttpMessage
  25. def getHeaders(): Iterable[javadsl.model.HttpHeader]

    Java API

    Java API

    Definition Classes
    HttpMessageHttpMessage
  26. def header[T <: javadsl.model.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
  27. val headers: Seq[HttpHeader]

    Definition Classes
    HttpResponseHttpMessage
  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. def isRequest(): Boolean

    Definition Classes
    HttpResponseHttpMessageHttpMessage
  30. def isResponse(): Boolean

    Definition Classes
    HttpResponseHttpMessageHttpMessage
  31. def mapEntity(f: (ResponseEntity) ⇒ ResponseEntity): HttpResponse

  32. 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
  33. 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
  34. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  37. val protocol: HttpProtocol

    Definition Classes
    HttpResponseHttpMessageHttpMessage
  38. 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
  39. def self: HttpResponse

    Definition Classes
    HttpResponseHttpMessage
  40. val status: StatusCode

    Definition Classes
    HttpResponseHttpResponse
  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  42. 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
  43. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. 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
  47. def withDefaultHeaders(defaultHeaders: 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
  48. def withEntity(entity: javadsl.model.RequestEntity): HttpResponse

    Definition Classes
    HttpResponse → MessageTransformations
  49. def withEntity(entity: MessageEntity): HttpResponse

    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
    HttpResponseHttpMessage
  50. def withEntity(entity: javadsl.model.ResponseEntity): HttpResponse

    Definition Classes
    HttpResponseHttpResponse
  51. def withEntity(contentType: javadsl.model.ContentType, file: File): Self

    Definition Classes
    HttpMessage
  52. def withEntity(contentType: javadsl.model.ContentType, bytes: ByteString): Self

    Definition Classes
    HttpMessage
  53. def withEntity(contentType: javadsl.model.ContentType, bytes: Array[Byte]): Self

    Definition Classes
    HttpMessage
  54. def withEntity(contentType: javadsl.model.ContentType, string: String): Self

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

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

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

    Definition Classes
    HttpMessage
  58. def withHeaders(headers: Seq[HttpHeader]): HttpResponse

    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
    HttpResponseHttpMessage
  59. 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
  60. def withHeadersAndEntity(headers: Seq[HttpHeader], entity: ResponseEntity): HttpResponse

  61. def withHeadersAndEntity(headers: Seq[HttpHeader], entity: MessageEntity): HttpResponse

    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
    HttpResponseHttpMessage
  62. def withProtocol(protocol: javadsl.model.HttpProtocol): javadsl.model.HttpResponse

    Definition Classes
    HttpResponse → MessageTransformations
  63. def withStatus(statusCode: javadsl.model.StatusCode): javadsl.model.HttpResponse

    Definition Classes
    HttpResponseHttpResponse
  64. def withStatus(statusCode: Int): javadsl.model.HttpResponse

    Definition Classes
    HttpResponseHttpResponse
  65. def [B](y: B): (HttpResponse, B)

    Implicit information
    This member is added by an implicit conversion from HttpResponse to ArrowAssoc[HttpResponse] 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 HttpResponse 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:
    (httpResponse: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from HttpResponse 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:
    (httpResponse: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: HttpResponse

    Implicit information
    This member is added by an implicit conversion from HttpResponse to ArrowAssoc[HttpResponse] 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:
    (httpResponse: ArrowAssoc[HttpResponse]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: HttpResponse

    Implicit information
    This member is added by an implicit conversion from HttpResponse to Ensuring[HttpResponse] 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:
    (httpResponse: Ensuring[HttpResponse]).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 javadsl.model.HttpMessage.MessageTransformations[javadsl.model.HttpResponse]

Inherited from javadsl.model.HttpMessage

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from HttpResponse to StringAdd

Inherited by implicit conversion any2stringfmt from HttpResponse to StringFormat

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

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

Ungrouped