Class/Object

io.fsq.fhttp

FHttpRequest

Related Docs: object FHttpRequest | package fhttp

Permalink

case class FHttpRequest(client: FHttpClient, uri: String, traceName: String, service: Service[Request, Response], options: List[HttpOption]) 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
Visibility
  1. Public
  2. All

Instance Constructors

  1. new FHttpRequest(client: FHttpClient, uri: String, traceName: String, service: Service[Request, Response], options: List[HttpOption])

    Permalink

Value Members

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

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

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

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

    Permalink
    Definition Classes
    Any
  5. def auth(user: String, password: String): FHttpRequest

    Permalink

    Adds a basic http auth header to the request

    Adds a basic http auth header to the request

    user

    The username

    password

    The password

  6. def base64(in: String): String

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

    Permalink
    Attributes
    protected
  8. val block: (Future[Response]) ⇒ ClientResponseOrException

    Permalink
    Attributes
    protected
  9. val client: FHttpClient

    Permalink
  10. def clone(): AnyRef

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

    Permalink
    Attributes
    protected
  12. def contentType(contentType: String): FHttpRequest

    Permalink

    Sets the content type header of the request

    Sets the content type header of the request

    contentType

    The content type

  13. def debug(): FHttpRequest

    Permalink

    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

  14. def deleteFuture[T](resMap: (Response) ⇒ T = FHttpRequest.asString): Future[T]

    Permalink

    Issue a non-blocking DELETE request

    Issue a non-blocking DELETE request

    resMap

    a function to convert the HttpResponse to the desired response type

  15. def deleteOption[T](resMap: (Response) ⇒ T = FHttpRequest.asString): Option[T]

    Permalink

    Issue a blocking DELETE request

    Issue a blocking DELETE request

    resMap

    a function to convert the HttpResponse to the desired response type

  16. def delete_![T](resMap: (Response) ⇒ T = FHttpRequest.asString): T

    Permalink

    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

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

    Permalink
    Definition Classes
    AnyRef
  18. def filter(f: Filter[Request, Response, Request, Response]): FHttpRequest

    Permalink

    Adds a filter to the service

    Adds a filter to the service

    f

    the filter to add to the stack

  19. def finalize(): Unit

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

    Permalink
    Attributes
    protected
  21. val finishOpt: (ClientResponseOrException) ⇒ Option[Response]

    Permalink
    Attributes
    protected
  22. def fullUri: String

    Permalink

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

  23. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  24. def getFuture[T](resMap: (Response) ⇒ T = FHttpRequest.asString): Future[T]

    Permalink

    Issue a non-blocking GET request

    Issue a non-blocking GET request

    resMap

    a function to convert the HttpResponse to the desired response type

  25. def getOption[T](resMap: (Response) ⇒ T = FHttpRequest.asString): Option[T]

    Permalink

    Issue a blocking GET request

    Issue a blocking GET request

    resMap

    a function to convert the HttpResponse to the desired response type

  26. def get_![T](resMap: (Response) ⇒ T = FHttpRequest.asString): T

    Permalink

    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

  27. def hasParams: Boolean

    Permalink
  28. def headFuture[T](resMap: (Response) ⇒ T = FHttpRequest.asString): Future[T]

    Permalink

    Issue a non-blocking HEAD request

    Issue a non-blocking HEAD request

    resMap

    a function to convert the HttpResponse to the desired response type

  29. def headOption[T](resMap: (Response) ⇒ T = FHttpRequest.asString): Option[T]

    Permalink

    Issue a blocking HEAD request

    Issue a blocking HEAD request

    resMap

    a function to convert the HttpResponse to the desired response type

  30. def head_![T](resMap: (Response) ⇒ T = FHttpRequest.asString): T

    Permalink

    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

  31. def headers(h: TraversableOnce[(String, String)]): FHttpRequest

    Permalink

    Adds headers to the request

    Adds headers to the request

    h

    The headers to add

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

    Permalink

    Adds headers to the request

    Adds headers to the request

    h

    The headers to add

  33. final def isInstanceOf[T0]: Boolean

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

    Permalink

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

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

    Permalink
    Definition Classes
    AnyRef
  36. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  37. final def notifyAll(): Unit

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

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

    Permalink

    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)

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

    Permalink

    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

  41. def oauth(consumer: Token): FHttpRequest

    Permalink

    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

  42. def option(o: HttpOption): FHttpRequest

    Permalink

    Adds a pre-filter transformation to the HttpMessage

    Adds a pre-filter transformation to the HttpMessage

    o

    A function to transform the HttpMessage

  43. val options: List[HttpOption]

    Permalink
  44. def paramList: List[(String, String)]

    Permalink
  45. def params(p: TraversableOnce[(String, String)]): FHttpRequest

    Permalink

    Adds parameters to the request

    Adds parameters to the request

    p

    The parameters to add

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

    Permalink

    Adds parameters to the request

    Adds parameters to the request

    p

    The parameters to add

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

    Permalink

    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

  48. def postFuture[T](data: String = "", resMap: (Response) ⇒ T = FHttpRequest.asString): Future[T]

    Permalink

    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

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

    Permalink

    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

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

    Permalink

    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

  51. def postOption[T](data: String = "", resMap: (Response) ⇒ T = FHttpRequest.asString): Option[T]

    Permalink

    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

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

    Permalink

    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

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

    Permalink

    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

  54. def post_![T](data: String = "", resMap: (Response) ⇒ T = FHttpRequest.asString): T

    Permalink

    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

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

    Permalink

    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

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

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

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

    Permalink
    Attributes
    protected
  59. def process[T](method: Method, processor: (Future[Response]) ⇒ T): T

    Permalink
    Attributes
    protected
  60. def putFuture[T](data: List[MultiPart], resMap: (Response) ⇒ T): Future[T]

    Permalink

    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

  61. def putFuture[T](data: String = "", resMap: (Response) ⇒ T = FHttpRequest.asString): Future[T]

    Permalink

    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

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

    Permalink

    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

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

    Permalink

    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

  64. def putOption[T](data: String = "", resMap: (Response) ⇒ T = FHttpRequest.asString): Option[T]

    Permalink

    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

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

    Permalink

    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

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

    Permalink

    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

  67. def put_![T](data: String = "", resMap: (Response) ⇒ T = FHttpRequest.asString): T

    Permalink

    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

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

    Permalink

    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

  69. val service: Service[Request, Response]

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

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

    Permalink

    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 NOTE(jacob): We create our own exception to pass down here, as the default used by TimeoutFilter does not include any stack trace information due to the way the timeout is implemented (future.within) causing a loss of all useful stack data. However, in some cases just having the call stack for this method invocation makes debugging significantly easier, so we subclass IndividualRequestTimeoutException and attach a useful stack trace to it via a proxied Exception, ensuring the service name is set as we do.

  72. def toPart(part: MultiPart): FilePart

    Permalink
    Attributes
    protected
  73. val traceName: String

    Permalink
  74. val uri: String

    Permalink
  75. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped