Response

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

Represents a HTTP response

Value parameters:
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

statusCode

the status code of the response

statusMessage

a string that describes the status code. This is not the reason phrase sent by the server, but a string describing statusCode, as hardcoded in this library

url

the URL that the original request was made to

trait Serializable
trait Product
trait Equals
trait Readable
trait Writable
trait ByteData
class Object
trait Matchable
class Any

Value members

Concrete methods

def bytes: Array[Byte]
override def contentLength: Option[Long]
Definition Classes
Writable
def contentType: Option[String]
override def httpContentType: Option[String]
Definition Classes
Writable
def is2xx: Boolean
def is3xx: Boolean
def is4xx: Boolean
def is5xx: Boolean
def location: Option[String]
def readBytesThrough[T](f: InputStream => T): T

Deprecated methods

@deprecated("Use `.bytes`")
def contents: Array[Byte]
Deprecated

Inherited methods

def lines(codec: Codec): Vector[String]
Inherited from:
ByteData
def lines(): Vector[String]
Inherited from:
ByteData
def productElementNames: Iterator[String]
Inherited from:
Product
def productIterator: Iterator[Any]
Inherited from:
Product
def text(codec: Codec): String
Inherited from:
ByteData
def text(): String
Inherited from:
ByteData
def trim(codec: Codec): String
Inherited from:
ByteData
def trim(): String
Inherited from:
ByteData
def writeBytesTo(out: OutputStream): Unit
Inherited from:
Readable

Concrete fields

val cookies: Map[String, HttpCookie]

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

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