com.nrinaudo.fetch

Request

trait Request[A] extends AnyRef

Represents an HTTP request.

Instances are created through the companion object. Once an instance is obtained, the request can be configured through "raw" modification methods (

method

,

headers

...) as well as specialised helpers such as

GET

,

acceptGzip

or

/

.

/ }}}

acceptGzip }}}

GET }}}

headers }}} as

GET

,

acceptGzip

or

/

.

/ }}}

acceptGzip }}}

GET }}}

method }}} as

GET

,

acceptGzip

or

/

.

/ }}}

acceptGzip }}}

GET }}}

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Request
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def apply(body: Option[RequestEntity]): A

  2. abstract def copy(url: Url, method: Method, headers: Headers): Request[A]

    Attributes
    protected
  3. abstract val headers: Headers

    List of HTTP headers of the request.

  4. abstract def map[B](f: (A) ⇒ B): Request[B]

    Applies the specified transformation to the request's eventual response.

    Applies the specified transformation to the request's eventual response.

    Application developers should be wary of a common pitfall: when working with responses that contain instances of ResponseEntity, they should always clean these up, either by reading their content (transforming it to something else or calling ResponseEntity.empty) or explicitly ignoring them (by calling ResponseEntity.ignore).

    This is a common source of issues when mapping error statuses to exceptions: each connection will be kept alive until the remote host decides it has timed out.

  5. abstract val method: Method

    HTTP method of the request.

  6. abstract val url: Url

    URL on which the request will be performed.

Concrete 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. def &[T](param: (String, T))(implicit arg0: ValueWriter[T]): Request[A]

  5. def /(segment: String): Request[A]

  6. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  8. def ?(value: QueryString): Request[A]

  9. def CONNECT: Request[A]

  10. def DELETE: Request[A]

  11. def GET: Request[A]

  12. def HEAD: Request[A]

  13. def LINK: Request[A]

  14. def OPTIONS: Request[A]

  15. def PATCH: Request[A]

  16. def POST: Request[A]

  17. def PUT: Request[A]

  18. def TRACE: Request[A]

  19. def UNLINK: Request[A]

  20. def accept: Option[Seq[Conneg[MediaType]]]

    Returns the value of this instance's content type preferences.

  21. def accept(types: Conneg[MediaType]*): Request[A]

    Notifies the remote server about response content type preferences.

    Notifies the remote server about response content type preferences.

    This maps to the Accept header.

    types

    list of media types to declare.

  22. def acceptCharset: Option[Seq[Conneg[Charset]]]

    Returns the value of this instance's charset preferences.

  23. def acceptCharset(charsets: Conneg[Charset]*): Request[A]

    Notifies the remote server about response charset preferences.

    Notifies the remote server about response charset preferences.

    This maps to the Accept-Charset header.

    charsets

    list of charsets to declare.

  24. def acceptDeflate: Request[A]

    Notifies the remote server that we accept deflated responses.

  25. def acceptEncoding: Option[Seq[Conneg[Encoding]]]

    Returns the value of this instance's encoding header.

  26. def acceptEncoding(encodings: Conneg[Encoding]*): Request[A]

    Notifies the remote server about transfer encoding preferences.

    Notifies the remote server about transfer encoding preferences.

    This maps to the Accept-Encoding header.

    encodings

    list of encodings to declare.

  27. def acceptGzip: Request[A]

    Notifies the remote server that we accept GZIPed responses.

  28. def acceptLanguage: Option[Seq[Conneg[Language]]]

    Returns the value of this instance's language preferences.

  29. def acceptLanguage(languages: Conneg[Language]*): Request[A]

    Notifies the remote server about response language preferences.

    Notifies the remote server about response language preferences.

    This maps to the Accept-Language header.

    languages

    list of languages to declare.

  30. def apply(body: RequestEntity): A

  31. def apply(): A

  32. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  33. def auth(user: String, pwd: String): Request[A]

  34. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. def date: Option[Date]

  36. def date(date: Date = new Date()): Request[A]

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

    Definition Classes
    AnyRef
  38. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  39. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  41. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  42. def header[T](name: String)(implicit arg0: ValueReader[T]): Option[T]

    Returns the value of the specified header.

  43. def header[T](name: String, value: T)(implicit arg0: ValueWriter[T]): Request[A]

    Sets the value of the specified header.

    Sets the value of the specified header.

    This method expects an appropriate implicit ValueWriter to be in scope. Standard formats are declared in Headers.

  44. def headers(value: Headers): Request[A]

  45. def ifMatch: Option[Seq[ETag]]

  46. def ifMatch(tags: ETag*): Request[A]

  47. def ifModifiedSince: Option[Date]

  48. def ifModifiedSince(date: Date): Request[A]

  49. def ifNoneMatch: Option[Seq[ETag]]

  50. def ifNoneMatch(tags: ETag*): Request[A]

  51. def ifRange(date: Date): Request[A]

  52. def ifRange(tag: ETag): Request[A]

  53. def ifUnmodifiedSince: Option[Date]

  54. def ifUnmodifiedSince(date: Date): Request[A]

  55. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  56. def maxForwards: Option[Int]

  57. def maxForwards(value: Int): Request[A]

  58. def method(value: Method): Request[A]

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

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

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

    Definition Classes
    AnyRef
  62. def range: Option[Seq[ByteRange]]

  63. def range(ranges: ByteRange*): Request[A]

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

    Definition Classes
    AnyRef
  65. def toString(): String

    Definition Classes
    AnyRef → Any
  66. def url(value: Url): Request[A]

  67. def userAgent: Option[String]

  68. def userAgent(name: String): Request[A]

  69. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped