trait SttpApi extends SttpExtensions with UriInterpolator

Linear Supertypes
UriInterpolator, SttpExtensions, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SttpApi
  2. UriInterpolator
  3. SttpExtensions
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. implicit class UriContext extends AnyRef
    Definition Classes
    UriInterpolator

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val DefaultReadTimeout: Duration
  5. def asBoth[A, B](l: ResponseAs[A, Any], r: ResponseAs[B, Any]): ResponseAs[(A, B), Any]

    Use both l and r to read the response body.

    Use both l and r to read the response body. Neither response specifications may use streaming or web sockets.

  6. def asBothOption[A, B, R](l: ResponseAs[A, R], r: ResponseAs[B, Any]): ResponseAs[(A, Option[B]), R]

    Use l to read the response body.

    Use l to read the response body. If the raw body value which is used by l is replayable (a file or byte array), also use r to read the response body. Otherwise ignore r (if the raw body is a stream or a web socket).

  7. def asByteArray: ResponseAs[Either[String, Array[Byte]], Any]
  8. def asByteArrayAlways: ResponseAs[Array[Byte], Any]
  9. def asEither[A, B, R](onError: ResponseAs[A, R], onSuccess: ResponseAs[B, R]): ResponseAs[Either[A, B], R]

    Uses the onSuccess response specification for successful responses (2xx), and the onError specification otherwise.

  10. def asFile(file: File): ResponseAs[Either[String, File], Any]
    Definition Classes
    SttpExtensions
  11. def asFileAlways(file: File): ResponseAs[File, Any]
    Definition Classes
    SttpExtensions
  12. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  13. def asParams(charset: String): ResponseAs[Either[String, Seq[(String, String)]], Any]

    Use the given charset by default, unless specified otherwise in the response headers.

  14. def asParams: ResponseAs[Either[String, Seq[(String, String)]], Any]

    Use the utf-8 charset by default, unless specified otherwise in the response headers.

  15. def asParamsAlways(charset: String): ResponseAs[Seq[(String, String)], Any]

    Use the given charset by default, unless specified otherwise in the response headers.

  16. def asParamsAlways: ResponseAs[Seq[(String, String)], Any]

    Use the utf-8 charset by default, unless specified otherwise in the response headers.

  17. def asPath(path: Path): ResponseAs[Either[String, Path], Any]
    Definition Classes
    SttpExtensions
  18. def asPathAlways(path: Path): ResponseAs[Path, Any]
    Definition Classes
    SttpExtensions
  19. def asStream[F[_], T, S](s: Streams[S])(f: (BinaryStream) => F[T]): ResponseAs[Either[String, T], Effect[F] with S]
  20. def asStreamAlways[F[_], T, S](s: Streams[S])(f: (BinaryStream) => F[T]): ResponseAs[T, Effect[F] with S]
  21. def asStreamAlwaysUnsafe[S](s: Streams[S]): ResponseAs[BinaryStream, S]
  22. def asStreamAlwaysWithMetadata[F[_], T, S](s: Streams[S])(f: (BinaryStream, ResponseMetadata) => F[T]): ResponseAs[T, Effect[F] with S]
  23. def asStreamUnsafe[S](s: Streams[S]): ResponseAs[Either[String, BinaryStream], S]
  24. def asStreamWithMetadata[F[_], T, S](s: Streams[S])(f: (BinaryStream, ResponseMetadata) => F[T]): ResponseAs[Either[String, T], Effect[F] with S]
  25. def asString(charset: String): ResponseAs[Either[String, String], Any]

    Use the given charset by default, unless specified otherwise in the response headers.

  26. def asString: ResponseAs[Either[String, String], Any]

    Use the utf-8 charset by default, unless specified otherwise in the response headers.

  27. def asStringAlways(charset: String): ResponseAs[String, Any]
  28. def asStringAlways: ResponseAs[String, Any]

    Use the utf-8 charset by default, unless specified otherwise in the response headers.

  29. def asWebSocket[F[_], T](f: (WebSocket[F]) => F[T]): ResponseAs[Either[String, T], Effect[F] with WebSockets]
  30. def asWebSocketAlways[F[_], T](f: (WebSocket[F]) => F[T]): ResponseAs[T, Effect[F] with WebSockets]
  31. def asWebSocketAlwaysUnsafe[F[_]]: ResponseAs[WebSocket[F], Effect[F] with WebSockets]
  32. def asWebSocketAlwaysWithMetadata[F[_], T](f: (WebSocket[F], ResponseMetadata) => F[T]): ResponseAs[T, Effect[F] with WebSockets]
  33. def asWebSocketEither[A, B, R](onError: ResponseAs[A, R], onSuccess: ResponseAs[B, R]): ResponseAs[Either[A, B], R]

    Uses the onSuccess response specification for 101 responses (switching protocols), and the onError specification otherwise.

  34. def asWebSocketStream[S](s: Streams[S])(p: Pipe[Data[_], WebSocketFrame]): ResponseAs[Either[String, Unit], S with WebSockets]
  35. def asWebSocketStreamAlways[S](s: Streams[S])(p: Pipe[Data[_], WebSocketFrame]): ResponseAs[Unit, S with WebSockets]
  36. def asWebSocketUnsafe[F[_]]: ResponseAs[Either[String, WebSocket[F]], Effect[F] with WebSockets]
  37. def asWebSocketWithMetadata[F[_], T](f: (WebSocket[F], ResponseMetadata) => F[T]): ResponseAs[Either[String, T], Effect[F] with WebSockets]
  38. val basicRequest: RequestT[Empty, Either[String, String], Any]

    A starting request, with the following modification comparing to emptyRequest: Accept-Encoding is set to gzip, deflate (compression/decompression is handled automatically by the library).

    A starting request, with the following modification comparing to emptyRequest: Accept-Encoding is set to gzip, deflate (compression/decompression is handled automatically by the library).

    Reads the response body as an Either[String, String], where Left is used if the status code is non-2xx, and Right otherwise.

  39. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  40. val emptyRequest: RequestT[Empty, Either[String, String], Any]

    An empty request with no headers.

    An empty request with no headers.

    Reads the response body as an Either[String, String], where Left is used if the status code is non-2xx, and Right otherwise.

  41. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  42. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  43. def fromMetadata[T, R](default: ResponseAs[T, R], conditions: ConditionalResponseAs[T, R]*): ResponseAs[T, R]
  44. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  45. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  46. def ignore: ResponseAs[Unit, Any]
  47. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  48. def multipart[B](name: String, b: B)(implicit arg0: BodySerializer[B]): Part[BasicRequestBody]

    Content type will be set to application/octet-stream, can be overridden later using the contentType method.

  49. def multipart(name: String, fs: Seq[(String, String)], encoding: String): Part[BasicRequestBody]

    Encodes the given parameters as form data.

    Encodes the given parameters as form data.

    Content type will be set to application/x-www-form-urlencoded, can be overridden later using the contentType method.

  50. def multipart(name: String, fs: Seq[(String, String)]): Part[BasicRequestBody]

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

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

    Content type will be set to application/x-www-form-urlencoded, can be overridden later using the contentType method.

  51. def multipart(name: String, fs: Map[String, String], encoding: String): Part[BasicRequestBody]

    Encodes the given parameters as form data.

    Encodes the given parameters as form data.

    Content type will be set to application/x-www-form-urlencoded, can be overridden later using the contentType method.

  52. def multipart(name: String, fs: Map[String, String]): Part[BasicRequestBody]

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

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

    Content type will be set to application/x-www-form-urlencoded, can be overridden later using the contentType method.

  53. def multipart(name: String, data: InputStream): Part[BasicRequestBody]

    Content type will be set to application/octet-stream, can be overridden later using the contentType method.

  54. def multipart(name: String, data: ByteBuffer): Part[BasicRequestBody]

    Content type will be set to application/octet-stream, can be overridden later using the contentType method.

  55. def multipart(name: String, data: Array[Byte]): Part[BasicRequestBody]

    Content type will be set to application/octet-stream, can be overridden later using the contentType method.

  56. def multipart(name: String, data: String, encoding: String): Part[BasicRequestBody]

    Content type will be set to text/plain with given encoding, can be overridden later using the contentType method.

  57. def multipart(name: String, data: String): Part[BasicRequestBody]

    Content type will be set to text/plain with utf-8 encoding, can be overridden later using the contentType method.

  58. def multipartFile(name: String, data: Path): Part[RequestBody[Any]]

    Content type will be set to application/octet-stream, can be overridden later using the contentType method.

    Content type will be set to application/octet-stream, can be overridden later using the contentType method.

    File name will be set to the name of the file.

    Definition Classes
    SttpExtensions
  59. def multipartFile(name: String, data: File): Part[RequestBody[Any]]

    Content type will be set to application/octet-stream, can be overridden later using the contentType method.

    Content type will be set to application/octet-stream, can be overridden later using the contentType method.

    File name will be set to the name of the file.

    Definition Classes
    SttpExtensions
  60. def multipartStream[S](s: Streams[S])(name: String, b: BinaryStream): Part[RequestBody[S]]

    Content type will be set to application/octet-stream, can be overridden later using the contentType method.

  61. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  62. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  63. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  64. val quickRequest: RequestT[Empty, String, Any]

    A starting request which always reads the response body as a string, regardless of the status code.

  65. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  66. def toString(): String
    Definition Classes
    AnyRef → Any
  67. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  68. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  69. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from UriInterpolator

Inherited from SttpExtensions

Inherited from AnyRef

Inherited from Any

Ungrouped