scalaj.http

HttpResponse

case class HttpResponse[T](body: T, code: Int, headers: Map[String, String]) extends Product with Serializable

Result of executing a scalaj.http.HttpRequest

T

the body response since it can be parsed directly to things other than String

body

the Http response body

code

the http response code from the status line

headers

the response headers

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HttpResponse
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new HttpResponse(body: T, code: Int, headers: Map[String, String])

    body

    the Http response body

    code

    the http response code from the status line

    headers

    the response headers

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. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val body: T

    the Http response body

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. val code: Int

    the http response code from the status line

  10. def contentType: Option[String]

    Content-Type header value

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

    Definition Classes
    AnyRef
  12. def finalize(): Unit

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

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

    the response headers

  15. def is2xx: Boolean

    is response code 2xx

  16. def is3xx: Boolean

    is response code 3xx

  17. def is4xx: Boolean

    is response code 4xx

  18. def is5xx: Boolean

    is response code 5xx

  19. def isClientError: Boolean

    same as is4xx

  20. def isCodeInRange(lower: Int, upper: Int): Boolean

    test if code is in beteween lower and upper inclusive

  21. def isError: Boolean

    same as (is4xx || is5xx)

  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def isNotError: Boolean

    same as !isError

  24. def isRedirect: Boolean

    same as is3xx

  25. def isServerError: Boolean

    same as is5xx

  26. def isSuccess: Boolean

    same as is2xx

  27. def location: Option[String]

    Location header value sent for redirects.

    Location header value sent for redirects. By default, this library will not follow redirects.

  28. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  31. def statusLine: String

    The full status line.

    The full status line. like "HTTP/1.1 200 OK" throws a RuntimeException if "Status" is not in headers

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

    Definition Classes
    AnyRef
  33. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped