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. FHttpRequest
  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 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. val client: FHttpClient

  12. def clone(): AnyRef

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

    Attributes
    protected
  14. 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

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

  16. def debugString(): String

    Returns the request, including scheme, sever, port, and params as a String.

  17. def deleteFuture[T](resMap: (HttpResponse) ⇒ T = FHttpRequest.asString): 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 = FHttpRequest.asString): 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 = FHttpRequest.asString): 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 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

  22. def finalize(): Unit

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

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

    Attributes
    protected
  25. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  26. def getFuture[T](resMap: (HttpResponse) ⇒ T = FHttpRequest.asString): 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

  27. def getOption[T](resMap: (HttpResponse) ⇒ T = FHttpRequest.asString): Option[T]

    Issue a blocking GET request

    Issue a blocking GET request

    resMap

    a function to convert the HttpResponse to the desired response type

  28. def get_![T](resMap: (HttpResponse) ⇒ T = FHttpRequest.asString): 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

  29. def hasParams: Boolean

  30. def headFuture[T](resMap: (HttpResponse) ⇒ T = FHttpRequest.asString): 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

  31. def headOption[T](resMap: (HttpResponse) ⇒ T = FHttpRequest.asString): Option[T]

    Issue a blocking HEAD request

    Issue a blocking HEAD request

    resMap

    a function to convert the HttpResponse to the desired response type

  32. def head_![T](resMap: (HttpResponse) ⇒ T = FHttpRequest.asString): 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

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

    Adds headers to the request

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

    Adds headers to the request

  35. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  36. 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)

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

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

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

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

    Attributes
    protected
  41. 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)

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

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

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

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

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

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

    Adds parameters to the request

    Adds parameters to the request

    p

    The parameters to add

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

    Adds parameters to the request

    Adds parameters to the request

    p

    The parameters to add

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

  50. def postFuture[T](data: String = "", resMap: (HttpResponse) ⇒ T = FHttpRequest.asString): 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

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

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

  53. def postOption[T](data: String = "", resMap: (HttpResponse) ⇒ T = FHttpRequest.asString): 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

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

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

  56. def post_![T](data: String = "", resMap: (HttpResponse) ⇒ T = FHttpRequest.asString): 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

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

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

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

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

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

    Attributes
    protected
  62. 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

  63. def putFuture[T](data: String = "", resMap: (HttpResponse) ⇒ T = FHttpRequest.asString): 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

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

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

  66. def putOption[T](data: String = "", resMap: (HttpResponse) ⇒ T = FHttpRequest.asString): 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

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

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

  69. def put_![T](data: String = "", resMap: (HttpResponse) ⇒ T = FHttpRequest.asString): 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

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

  71. val service: Service[HttpRequest, HttpResponse]

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

    Definition Classes
    AnyRef
  73. 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

  74. def toPart(part: MultiPart): FilePart

    Attributes
    protected
  75. val traceName: String

  76. val uri: String

  77. final def wait(): Unit

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  79. 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