com.sksamuel.scruffy

HttpRequest

Related Doc: package scruffy

case class HttpRequest(uri: Uri, method: HttpMethod, entity: Array[Byte] = Array.emptyByteArray, headers: List[Header] = Nil, response: HttpResponse = HttpResponse.ok, properties: Map[PropertyKey[Any], Any] = Map.empty, context: ScruffyContext = ScruffyContext.apply) extends Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HttpRequest
  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 HttpRequest(uri: Uri, method: HttpMethod, entity: Array[Byte] = Array.emptyByteArray, headers: List[Header] = Nil, response: HttpResponse = HttpResponse.ok, properties: Map[PropertyKey[Any], Any] = Map.empty, context: ScruffyContext = ScruffyContext.apply)

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 clone(): AnyRef

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

  7. val context: ScruffyContext

  8. def cookie(name: String): Option[Cookie]

  9. def cookieValue(name: String): Option[String]

  10. lazy val cookies: List[Cookie]

  11. val entity: Array[Byte]

  12. def entityAs[F](implicit arg0: Manifest[F]): F

    Returns the entity/payload of the request, marshalled into an instance of the given type parameter.

    Returns the entity/payload of the request, marshalled into an instance of the given type parameter. For example, given a case class Customer then entityAs[Customer] would attempt to marshall the entity into an instance of Customer.

    The marshaller is chosen by the registered marshallers.

    returns

    the entity as the marshalled type.

  13. def entityStream: InputStream

  14. def entityString: String

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

    Definition Classes
    AnyRef
  16. def etag: Option[String]

  17. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  19. def hasCookie(name: String): Boolean

  20. def hasHeader(name: String): Boolean

  21. def hasHeader(name: HeaderName): Boolean

  22. 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

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

  24. def header(name: HeaderName): Option[String]

    Returns the optional header for the given HeaderName

    Returns the optional header for the given HeaderName

    returns

    the matching header of None

  25. val headers: List[Header]

  26. def id: RequestId

  27. def idOpt: Option[RequestId]

  28. def ipAddress: String

  29. def ipAddressOpt: Option[String]

  30. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  31. def isSecure: Boolean

  32. def mediaType: Option[MediaType]

  33. val method: HttpMethod

  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. def pathParam(name: String): String

  38. def pathParams: Map[String, String]

  39. val properties: Map[PropertyKey[Any], Any]

  40. def property[T](key: PropertyKey[T]): 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

  41. def propertyOption[T](key: PropertyKey[T]): Option[T]

  42. def queryParam(name: String): Option[String]

  43. def queryParams: Seq[Parameter]

  44. def queryParams(name: String): Seq[String]

  45. def queryParamsAs[P <: Product](implicit arg0: Manifest[P]): P

  46. def referer: Option[String]

  47. val response: HttpResponse

  48. def session: Session

  49. def sessionOpt: Option[Session]

  50. def skipped: HttpRequest

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

    Definition Classes
    AnyRef
  52. val uri: Uri

  53. def userAgent: Option[String]

  54. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. def withHeader(name: HeaderName, value: String): HttpRequest

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

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

    returns

    returns the new request with the added header

  58. def withProperty[T](key: PropertyKey[T], value: T): HttpRequest

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

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

    returns

    returns the new request with the added property

  59. def withResponse(response: HttpResponse): HttpRequest

  60. def withSession(session: Session): HttpRequest

  61. def withoutHeader(name: HeaderName): HttpRequest

  62. def withoutHeader(name: String): HttpRequest

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped