com.sksamuel.scruffy

HttpResponse

Related Docs: object HttpResponse | package scruffy

case class HttpResponse(status: Int, entity: Any = Array.emptyByteArray, cookies: List[Cookie] = Nil, headers: Map[String, String] = Map.empty, properties: Map[PropertyKey[Any], Any] = Map.empty) extends Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Known Subclasses
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(status: Int, entity: Any = Array.emptyByteArray, cookies: List[Cookie] = Nil, headers: Map[String, String] = Map.empty, properties: Map[PropertyKey[Any], Any] = Map.empty)

Value Members

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

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

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

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

    Definition Classes
    Any
  5. def cache(maxAge: Int, cacheType: CacheType = CacheType.Public): HttpResponse

  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def contentType: Option[String]

  8. val cookies: List[Cookie]

  9. def entity(e: Any, contentType: String): HttpResponse

  10. def entity(e: Any, mediaType: MediaType): HttpResponse

  11. def entity(e: Any): HttpResponse

    Sets the entity type on this response.

    Sets the entity type on this response. The content type will be inferred from the instance type.

  12. val entity: Any

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

    Definition Classes
    AnyRef
  14. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  16. def hasHeader(key: HeaderKey): Boolean

  17. def hasHeader(name: String): Boolean

  18. def hasProperty(key: PropertyKey[_]): Boolean

    Returns true if the request has a property value set for the given property key

    Returns true if the request has a property value set for the given property key

    key

    the property to test for

  19. def header(key: HeaderKey): Option[String]

  20. def header(name: String): Option[String]

  21. val headers: Map[String, String]

  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def json[T](e: T)(implicit serializer: Serializer[T]): HttpResponse

  24. def mediaType: Option[MediaType]

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

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

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

    Definition Classes
    AnyRef
  28. val properties: Map[PropertyKey[Any], Any]

  29. def property[T](key: PropertyKey[T]): Option[T]

    Returns the property value for the given property key.

    Returns the property value for the given property key.

    key

    the property to test for

  30. def status(code: Int): HttpResponse

  31. def status(status: HttpStatus): HttpResponse

  32. val status: Int

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

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def withContentType(c: String): HttpResponse

  38. def withContentType(mediaType: MediaType): HttpResponse

  39. def withCookie(name: String, v: String, maxAge: Int): HttpResponse

  40. def withCookie(name: String, value: String): HttpResponse

  41. def withCookie(cookie: Cookie): HttpResponse

  42. def withHeader(name: String, value: String): HttpResponse

  43. def withHeader(key: HeaderKey, value: String): HttpResponse

  44. def withProperty[T](key: PropertyKey[T], value: T): HttpResponse

    Adds a property to the request.

    Adds a property to the request. Will replace any existing value for that property.

    returns

    returns the new request with the added property

  45. def withoutCookie(name: String): HttpResponse

  46. def withoutHeader(key: HeaderKey): HttpResponse

  47. def withoutHeader(name: String): HttpResponse

  48. def xml[T](e: T)(implicit serializer: Serializer[T]): HttpResponse

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped