Class

requests

Response

Related Doc: package requests

Permalink

case class Response(url: String, statusCode: Int, statusMessage: String, data: Bytes, headers: Map[String, Seq[String]], history: Option[Response]) extends ByteData with Readable with Product with Serializable

Represents a HTTP response

url

the URL that the original request was made to

statusCode

the status code of the response

statusMessage

the status message of the response

data

the response body; may contain HTML, JSON, or binary or textual data

headers

the raw headers the server sent back with the response

history

the response of any redirects that were performed before arriving at the current response

Linear Supertypes
Serializable, Serializable, Product, Equals, Readable, Writable, ByteData, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Response
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. Readable
  7. Writable
  8. ByteData
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Response(url: String, statusCode: Int, statusMessage: String, data: Bytes, headers: Map[String, Seq[String]], history: Option[Response])

    Permalink

    url

    the URL that the original request was made to

    statusCode

    the status code of the response

    statusMessage

    the status message of the response

    data

    the response body; may contain HTML, JSON, or binary or textual data

    headers

    the raw headers the server sent back with the response

    history

    the response of any redirects that were performed before arriving at the current response

Value Members

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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def bytes: Array[Byte]

    Permalink
    Definition Classes
    Response → ByteData
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def contentLength: Option[Long]

    Permalink
    Definition Classes
    Response → Writable
  8. def contentType: Option[String]

    Permalink
  9. val cookies: Map[String, HttpCookie]

    Permalink

    Returns the cookies set by this response, and by any redirects that lead up to it

  10. val data: Bytes

    Permalink

    the response body; may contain HTML, JSON, or binary or textual data

  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. val headers: Map[String, Seq[String]]

    Permalink

    the raw headers the server sent back with the response

  15. val history: Option[Response]

    Permalink

    the response of any redirects that were performed before arriving at the current response

  16. def httpContentType: Option[String]

    Permalink
    Definition Classes
    Response → Writable
  17. def is2xx: Boolean

    Permalink
  18. def is3xx: Boolean

    Permalink
  19. def is4xx: Boolean

    Permalink
  20. def is5xx: Boolean

    Permalink
  21. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  22. def lines(codec: Codec): Vector[String]

    Permalink
    Definition Classes
    ByteData
  23. def lines(): Vector[String]

    Permalink
    Definition Classes
    ByteData
  24. def location: Option[String]

    Permalink
  25. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  26. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  27. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  28. def readBytesThrough[T](f: (InputStream) ⇒ T): T

    Permalink
    Definition Classes
    Response → Readable
  29. val statusCode: Int

    Permalink

    the status code of the response

  30. val statusMessage: String

    Permalink

    the status message of the response

  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  32. def text(codec: Codec): String

    Permalink
    Definition Classes
    ByteData
  33. def text(): String

    Permalink
    Definition Classes
    ByteData
  34. def trim(codec: Codec): String

    Permalink
    Definition Classes
    ByteData
  35. def trim(): String

    Permalink
    Definition Classes
    ByteData
  36. val url: String

    Permalink

    the URL that the original request was made to

  37. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. def writeBytesTo(out: OutputStream): Unit

    Permalink
    Definition Classes
    Readable → Writable

Deprecated Value Members

  1. def contents: Array[Byte]

    Permalink
    Annotations
    @deprecated
    Deprecated

    Use .bytes

  2. def string(codec: Codec): String

    Permalink
    Definition Classes
    ByteData
    Annotations
    @deprecated
    Deprecated

    Use .text()

  3. def string(): String

    Permalink
    Definition Classes
    ByteData
    Annotations
    @deprecated
    Deprecated

    Use .text()

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Readable

Inherited from Writable

Inherited from ByteData

Inherited from AnyRef

Inherited from Any

Ungrouped