com.foursquare.fhttp

FHttpRequest

case class FHttpRequest(client: FHttpClient, uri: String, traceName: String, service: Service[HttpRequest, HttpResponse], options: List[(HttpMessage) ⇒ Unit]) extends Product with Serializable

An HTTP request

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. FHttpRequest
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FHttpRequest(client: FHttpClient, uri: String, traceName: String, service: Service[HttpRequest, HttpResponse], options: List[(HttpMessage) ⇒ Unit])

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. def auth(user: String, password: String): FHttpRequest

    Adds a basic http auth header to the request

    Adds a basic http auth header to the request

    user

    The username

    password

    The password

  8. def base64(in: String): String

    Attributes
    protected
  9. def base64(bytes: Array[Byte]): String

    Attributes
    protected
  10. val block: (Future[HttpResponse]) ⇒ ClientResponseOrException

    Attributes
    protected
  11. def canEqual(arg0: Any): Boolean

    Definition Classes
    FHttpRequest → Equals
  12. val client: FHttpClient

  13. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  14. def content(data: Array[Byte]): FHttpRequest

    Attributes
    protected
  15. def contentType(t: String): FHttpRequest

    Sets the content type header of the request

    Sets the content type header of the request

    t

    The content type

  16. def debug(): FHttpRequest

    Adds a debugging filter to print the request and the response.

    Adds a debugging filter to print the request and the response. Can be added multiple times to inspect the filter transformations

  17. def deleteFuture[T](resMap: (HttpResponse) ⇒ T): Future[T]

    Issue a non-blocking DELETE request

    Issue a non-blocking DELETE request

    resMap

    a function to convert the HttpResponse to the desired response type

  18. def deleteOption[T](resMap: (HttpResponse) ⇒ T): Option[T]

    Issue a blocking DELETE request

    Issue a blocking DELETE request

    resMap

    a function to convert the HttpResponse to the desired response type

  19. def delete_![T](resMap: (HttpResponse) ⇒ T): T

    Issue a blocking DELETE request and throw on failure

    Issue a blocking DELETE request and throw on failure

    resMap

    a function to convert the HttpResponse to the desired response type

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

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

    Definition Classes
    FHttpRequest → Equals → AnyRef → Any
  22. def filter(f: Filter[HttpRequest, HttpResponse, HttpRequest, HttpResponse]): FHttpRequest

    Adds a filter to the service

    Adds a filter to the service

    f

    the filter to add to the stack

  23. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  24. val finishBang: (ClientResponseOrException) ⇒ HttpResponse

    Attributes
    protected
  25. val finishOpt: (ClientResponseOrException) ⇒ Option[HttpResponse]

    Attributes
    protected
  26. def fullUri: String

    An approximate representation of the full uri: including scheme, sever, port, and params as a string

  27. final def getClass(): java.lang.Class[_]

    Definition Classes
    AnyRef → Any
  28. def getFuture[T](resMap: (HttpResponse) ⇒ T): Future[T]

    Issue a non-blocking GET request

    Issue a non-blocking GET request

    resMap

    a function to convert the HttpResponse to the desired response type

  29. def getOption[T](resMap: (HttpResponse) ⇒ T): Option[T]

    Issue a blocking GET request

    Issue a blocking GET request

    resMap

    a function to convert the HttpResponse to the desired response type

  30. def get_![T](resMap: (HttpResponse) ⇒ T): T

    Issue a blocking GET request and throw on failure

    Issue a blocking GET request and throw on failure

    resMap

    a function to convert the HttpResponse to the desired response type

  31. def hasParams: Boolean

  32. def hashCode(): Int

    Definition Classes
    FHttpRequest → AnyRef → Any
  33. def headFuture[T](resMap: (HttpResponse) ⇒ T): Future[T]

    Issue a non-blocking HEAD request

    Issue a non-blocking HEAD request

    resMap

    a function to convert the HttpResponse to the desired response type

  34. def headOption[T](resMap: (HttpResponse) ⇒ T): Option[T]

    Issue a blocking HEAD request

    Issue a blocking HEAD request

    resMap

    a function to convert the HttpResponse to the desired response type

  35. def head_![T](resMap: (HttpResponse) ⇒ T): T

    Issue a blocking HEAD request and throw on failure

    Issue a blocking HEAD request and throw on failure

    resMap

    a function to convert the HttpResponse to the desired response type

  36. def headers(h: List[(String, String)]): FHttpRequest

    Adds headers to the request

  37. def headers(h: (String, String)*): FHttpRequest

    Adds headers to the request

  38. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  39. def keepAlive(isKeepAlive: Boolean): FHttpRequest

    Sets the keep alive header of the request (useful for HTTP 1.

    Sets the keep alive header of the request (useful for HTTP 1.0)

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

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

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

    Definition Classes
    AnyRef
  43. def oauth(consumer: Token, token: Option[Token], verifier: Option[String]): FHttpRequest

    Attributes
    protected
  44. def oauth(consumer: Token, token: Token, verifier: String): FHttpRequest

    Adds tokens to the request.

    Adds tokens to the request. The request will be signed with both tokens

    consumer

    The consumer token

    token

    The oauth token

    verifier

    The verifier parameter (1.0a)

  45. def oauth(consumer: Token, token: Token): FHttpRequest

    Adds tokens to the request.

    Adds tokens to the request. The request will be signed with both tokens

    consumer

    The consumer token

    token

    The oauth token

  46. def oauth(consumer: Token): FHttpRequest

    Adds a consumer token to the request.

    Adds a consumer token to the request. The request will be signed with this token

    consumer

    The token to add

  47. def option(o: (HttpMessage) ⇒ Unit): FHttpRequest

    Adds a pre-filter transformation to the HttpMessage

    Adds a pre-filter transformation to the HttpMessage

    o

    A function to transform the HttpMessage

  48. val options: List[(HttpMessage) ⇒ Unit]

  49. def paramList: List[(String, String)]

  50. def params(p: List[(String, String)]): FHttpRequest

    Adds parameters to the request

    Adds parameters to the request

    p

    The parameters to add

  51. def params(p: (String, String)*): FHttpRequest

    Adds parameters to the request

    Adds parameters to the request

    p

    The parameters to add

  52. def postFuture[T](data: List[MultiPart], resMap: (HttpResponse) ⇒ T): Future[T]

    Issue a non-blocking multipart POST request

    Issue a non-blocking multipart POST request

    data

    The parts to provide in the multipart message

    resMap

    A function to convert the HttpResponse to the desired response type

  53. def postFuture[T](data: String, resMap: (HttpResponse) ⇒ T): Future[T]

    Issue a non-blocking POST request

    Issue a non-blocking POST request

    data

    The content to provide in the message

    resMap

    A function to convert the HttpResponse to the desired response type

  54. def postFuture[T](data: Array[Byte], resMap: (HttpResponse) ⇒ T): Future[T]

    Issue a non-blocking POST request

    Issue a non-blocking POST request

    data

    The content to provide in the message

    resMap

    A function to convert the HttpResponse to the desired response type

  55. def postOption[T](data: List[MultiPart], resMap: (HttpResponse) ⇒ T): Option[T]

    Issue blocking multipart POST request

    Issue blocking multipart POST request

    data

    The parts to provide in the multipart message

    resMap

    A function to convert the HttpResponse to the desired response type

  56. def postOption[T](data: String, resMap: (HttpResponse) ⇒ T): Option[T]

    Issue a blocking POST request

    Issue a blocking POST request

    data

    The content to provide in the message

    resMap

    A function to convert the HttpResponse to the desired response type

  57. def postOption[T](data: Array[Byte], resMap: (HttpResponse) ⇒ T): Option[T]

    Issue a blocking POST request

    Issue a blocking POST request

    data

    The content to provide in the message

    resMap

    A function to convert the HttpResponse to the desired response type

  58. def post_![T](data: List[MultiPart], resMap: (HttpResponse) ⇒ T): T

    Issue blocking multipart POST request and throw on failure

    Issue blocking multipart POST request and throw on failure

    data

    The parts to provide in the multipart message

    resMap

    A function to convert the HttpResponse to the desired response type

  59. def post_![T](data: String, resMap: (HttpResponse) ⇒ T): T

    Issue a blocking POST request and throw on failure

    Issue a blocking POST request and throw on failure

    data

    The content to provide in the message

    resMap

    A function to convert the HttpResponse to the desired response type

  60. def post_![T](data: Array[Byte], resMap: (HttpResponse) ⇒ T): T

    Issue a blocking POST request and throw on failure

    Issue a blocking POST request and throw on failure

    data

    The content to provide in the message

    resMap

    A function to convert the HttpResponse to the desired response type

  61. def prepData(data: Array[Byte]): FHttpRequest

    Attributes
    protected
  62. def prepMultipart(parts: List[Part]): FHttpRequest

    Attributes
    protected
  63. def prepPost(data: Array[Byte]): FHttpRequest

    Attributes
    protected
  64. def process[T](method: HttpMethod, processor: (Future[HttpResponse]) ⇒ T): T

    Attributes
    protected
  65. def productArity: Int

    Definition Classes
    FHttpRequest → Product
  66. def productElement(arg0: Int): Any

    Definition Classes
    FHttpRequest → Product
  67. def productIterator: Iterator[Any]

    Definition Classes
    Product
  68. def productPrefix: String

    Definition Classes
    FHttpRequest → Product
  69. def putFuture[T](data: List[MultiPart], resMap: (HttpResponse) ⇒ T): Future[T]

    Issue a non-blocking multipart POST request

    Issue a non-blocking multipart POST request

    data

    The parts to provide in the multipart message

    resMap

    A function to convert the HttpResponse to the desired response type

  70. def putFuture[T](data: String, resMap: (HttpResponse) ⇒ T): Future[T]

    Issue a non-blocking PUT request

    Issue a non-blocking PUT request

    data

    The content to provide in the message

    resMap

    A function to convert the HttpResponse to the desired response type

  71. def putFuture[T](data: Array[Byte], resMap: (HttpResponse) ⇒ T): Future[T]

    Issue a non-blocking PUT request

    Issue a non-blocking PUT request

    data

    The content to provide in the message

    resMap

    A function to convert the HttpResponse to the desired response type

  72. def putOption[T](data: List[MultiPart], resMap: (HttpResponse) ⇒ T): Option[T]

    Issue blocking multipart PUT request

    Issue blocking multipart PUT request

    data

    The parts to provide in the multipart message

    resMap

    A function to convert the HttpResponse to the desired response type

  73. def putOption[T](data: String, resMap: (HttpResponse) ⇒ T): Option[T]

    Issue a blocking PUT request

    Issue a blocking PUT request

    data

    The content to provide in the message

    resMap

    A function to convert the HttpResponse to the desired response type

  74. def putOption[T](data: Array[Byte], resMap: (HttpResponse) ⇒ T): Option[T]

    Issue a blocking PUT request

    Issue a blocking PUT request

    data

    The content to provide in the message

    resMap

    A function to convert the HttpResponse to the desired response type

  75. def put_![T](data: List[MultiPart], resMap: (HttpResponse) ⇒ T): T

    Issue blocking multipart PUT request and throw on failure

    Issue blocking multipart PUT request and throw on failure

    data

    The parts to provide in the multipart message

    resMap

    A function to convert the HttpResponse to the desired response type

  76. def put_![T](data: String, resMap: (HttpResponse) ⇒ T): T

    Issue a blocking PUT request and throw on failure

    Issue a blocking PUT request and throw on failure

    data

    The content to provide in the message

    resMap

    A function to convert the HttpResponse to the desired response type

  77. def put_![T](data: Array[Byte], resMap: (HttpResponse) ⇒ T): T

    Issue a blocking PUT request and throw on failure

    Issue a blocking PUT request and throw on failure

    data

    The content to provide in the message

    resMap

    A function to convert the HttpResponse to the desired response type

  78. val service: Service[HttpRequest, HttpResponse]

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

    Definition Classes
    AnyRef
  80. def timeout(millis: Int): FHttpRequest

    Adds a request timeout (using the TimeoutFilter) to the stack.

    Adds a request timeout (using the TimeoutFilter) to the stack. Applies blocking or future responses.

    millis

    The number of milliseconds to wait

  81. def toPart(part: MultiPart): FilePart

    Attributes
    protected
  82. def toString(): String

    Definition Classes
    FHttpRequest → AnyRef → Any
  83. val traceName: String

  84. val uri: String

  85. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Deprecated Value Members

  1. def productElements: Iterator[Any]

    Definition Classes
    Product
    Annotations
    @deprecated
    Deprecated

    (Since version 2.8.0) use productIterator instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any