Class

com.softwaremill.sttp

RequestT

Related Doc: package sttp

Permalink

case class RequestT[U[_], T, +S](method: U[Method], uri: U[URI], body: RequestBody[S], headers: Seq[(String, String)], responseAs: ResponseAs[T, S]) extends Product with Serializable

U

Specifies if the method & uri are specified. By default can be either: * Empty, which is a type constructor which always resolves to None. This type of request is aliased to PartialRequest: there's no method and uri specified, and the request cannot be sent. * Id, which is an identity type constructor. This type of request is aliased to Request: the method and uri are specified, and the request can be sent.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RequestT
  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 RequestT(method: U[Method], uri: U[URI], body: RequestBody[S], headers: Seq[(String, String)], responseAs: ResponseAs[T, S])

    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. def acceptEncoding(encoding: String): RequestT[U, T, S]

    Permalink
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def auth: SpecifyAuthScheme[U, T, S]

    Permalink
  7. def body[B](b: B)(implicit arg0: BodySerializer[B]): RequestT[U, T, S]

    Permalink

    If content type is not yet specified, will be set to application/octet-stream.

  8. def body(fs: Seq[(String, String)], encoding: String): RequestT[U, T, S]

    Permalink

    Encodes the given parameters as form data.

    Encodes the given parameters as form data. If content type is not yet specified, will be set to application/x-www-form-urlencoded.

    If content length is not yet specified, will be set to the length of the number of bytes in the url-encoded parameter string.

  9. def body(fs: (String, String)*): RequestT[U, T, S]

    Permalink

    Encodes the given parameters as form data using utf-8.

    Encodes the given parameters as form data using utf-8. If content type is not yet specified, will be set to application/x-www-form-urlencoded.

    If content length is not yet specified, will be set to the length of the number of bytes in the url-encoded parameter string.

  10. def body(fs: Map[String, String], encoding: String): RequestT[U, T, S]

    Permalink

    Encodes the given parameters as form data.

    Encodes the given parameters as form data. If content type is not yet specified, will be set to application/x-www-form-urlencoded.

    If content length is not yet specified, will be set to the length of the number of bytes in the url-encoded parameter string.

  11. def body(fs: Map[String, String]): RequestT[U, T, S]

    Permalink

    Encodes the given parameters as form data using utf-8.

    Encodes the given parameters as form data using utf-8. If content type is not yet specified, will be set to application/x-www-form-urlencoded.

    If content length is not yet specified, will be set to the length of the number of bytes in the url-encoded parameter string.

  12. def body(b: Path): RequestT[U, T, S]

    Permalink

    If content type is not yet specified, will be set to application/octet-stream.

    If content type is not yet specified, will be set to application/octet-stream.

    If content length is not yet specified, will be set to the length of the given file.

  13. def body(b: File): RequestT[U, T, S]

    Permalink

    If content type is not yet specified, will be set to application/octet-stream.

    If content type is not yet specified, will be set to application/octet-stream.

    If content length is not yet specified, will be set to the length of the given file.

  14. def body(b: InputStream): RequestT[U, T, S]

    Permalink

    If content type is not yet specified, will be set to application/octet-stream.

  15. def body(b: ByteBuffer): RequestT[U, T, S]

    Permalink

    If content type is not yet specified, will be set to application/octet-stream.

  16. def body(b: Array[Byte]): RequestT[U, T, S]

    Permalink

    If content type is not yet specified, will be set to application/octet-stream.

    If content type is not yet specified, will be set to application/octet-stream.

    If content length is not yet specified, will be set to the length of the given array.

  17. def body(b: String, encoding: String): RequestT[U, T, S]

    Permalink

    If content type is not yet specified, will be set to text/plain with the given encoding.

    If content type is not yet specified, will be set to text/plain with the given encoding.

    If content length is not yet specified, will be set to the number of bytes in the string using the given encoding.

  18. def body(b: String): RequestT[U, T, S]

    Permalink

    Uses the utf-8 encoding.

    Uses the utf-8 encoding.

    If content type is not yet specified, will be set to text/plain with utf-8 encoding.

    If content length is not yet specified, will be set to the number of bytes in the string using the utf-8 encoding.

  19. val body: RequestBody[S]

    Permalink
  20. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. def contentLength(l: Long): RequestT[U, T, S]

    Permalink
  22. def contentType(ct: String, encoding: String): RequestT[U, T, S]

    Permalink
  23. def contentType(ct: String): RequestT[U, T, S]

    Permalink
  24. def cookie(n: String, v: String): RequestT[U, T, S]

    Permalink
  25. def cookie(nv: (String, String)): RequestT[U, T, S]

    Permalink
  26. def cookies(nvs: (String, String)*): RequestT[U, T, S]

    Permalink
  27. def cookies(cs: Seq[Cookie]): RequestT[U, T, S]

    Permalink
  28. def cookies(r: Response[_]): RequestT[U, T, S]

    Permalink
  29. def delete(uri: URI): Request[T, S]

    Permalink
  30. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  31. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  32. def get(uri: URI): Request[T, S]

    Permalink
  33. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  34. def head(uri: URI): Request[T, S]

    Permalink
  35. def header(k: String, v: String, replaceExisting: Boolean = false): RequestT[U, T, S]

    Permalink
  36. def headers(hs: (String, String)*): RequestT[U, T, S]

    Permalink
  37. def headers(hs: Map[String, String]): RequestT[U, T, S]

    Permalink
  38. val headers: Seq[(String, String)]

    Permalink
  39. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  40. def mapResponse[T2](f: (T) ⇒ T2): RequestT[U, T2, S]

    Permalink
  41. val method: U[Method]

    Permalink
  42. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  45. def options(uri: URI): Request[T, S]

    Permalink
  46. def patch(uri: URI): Request[T, S]

    Permalink
  47. def post(uri: URI): Request[T, S]

    Permalink
  48. def proxyAuth: SpecifyAuthScheme[U, T, S]

    Permalink
  49. def put(uri: URI): Request[T, S]

    Permalink
  50. def response[T2, S2 >: S](ra: ResponseAs[T2, S2]): RequestT[U, T2, S2]

    Permalink

    What's the target type to which the response body should be read.

    What's the target type to which the response body should be read. Needs to be specified upfront so that the response is always consumed and hence there are no requirements on client code to consume it. An exception to this are streaming responses, which need to fully consumed by the client if such a response type is requested.

  51. val responseAs: ResponseAs[T, S]

    Permalink
  52. def send[R[_]]()(implicit handler: SttpHandler[R, S], isIdInRequest: IsIdInRequest[U]): R[Response[T]]

    Permalink
  53. def streamBody[S2 >: S](b: S2): RequestT[U, T, S2]

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

    Permalink
    Definition Classes
    AnyRef
  55. val uri: U[URI]

    Permalink
  56. final def wait(): Unit

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

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