Package

sttp

client

Permalink

package client

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. client
  2. SttpApi
  3. SttpExtensions
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractCurlBackend[R[_], S] extends SttpBackend[R, S]

    Permalink
  2. sealed trait BasicRequestBody extends RequestBody[Nothing]

    Permalink
  3. sealed trait BasicResponseAs[T, +S] extends ResponseAs[T, S]

    Permalink

    Response handling specification which isn't derived from another response handling method, but needs to be handled directly by the backend.

  4. type BodySerializer[B] = (B) ⇒ BasicRequestBody

    Permalink

    Provide an implicit value of this type to serialize arbitrary classes into a request body.

    Provide an implicit value of this type to serialize arbitrary classes into a request body. Backends might also provide special logic for serializer instances which they define (e.g. to handle streaming).

  5. case class ByteArrayBody(b: Array[Byte], defaultContentType: Option[String] = Some(MediaTypes.Binary)) extends BasicRequestBody with Product with Serializable

    Permalink
  6. case class ByteBufferBody(b: ByteBuffer, defaultContentType: Option[String] = Some(MediaTypes.Binary)) extends BasicRequestBody with Product with Serializable

    Permalink
  7. case class DeserializationError[T](original: String, error: T) extends ResponseError[T] with Product with Serializable

    Permalink
  8. class EitherBackend[S] extends SttpBackend[[β$0$]Either[Throwable, β$0$], S]

    Permalink

    A synchronous backend that safely wraps SttpBackend exceptions in Either[Throwable, ?]'s

    A synchronous backend that safely wraps SttpBackend exceptions in Either[Throwable, ?]'s

    S

    The type of streams that are supported by the backend. Nothing, if streaming requests/responses is not supported by this backend.

  9. type Empty[X] = None.type

    Permalink
  10. case class FileBody(f: SttpFile, defaultContentType: Option[String] = Some(MediaTypes.Binary)) extends BasicRequestBody with Product with Serializable

    Permalink
  11. class FollowRedirectsBackend[R[_], S] extends SttpBackend[R, S]

    Permalink
  12. case class HttpError(body: String) extends ResponseError[Nothing] with Product with Serializable

    Permalink
  13. type Identity[X] = X

    Permalink
  14. case class InputStreamBody(b: InputStream, defaultContentType: Option[String] = Some(MediaTypes.Binary)) extends BasicRequestBody with Product with Serializable

    Permalink
  15. case class MappedResponseAs[T, T2, S](raw: ResponseAs[T, S], g: (T, ResponseMetadata) ⇒ T2) extends ResponseAs[T2, S] with Product with Serializable

    Permalink
  16. case class Multipart(name: String, body: BasicRequestBody, fileName: Option[String] = None, contentType: Option[String] = None, additionalHeaders: Map[String, String] = Map()) extends Product with Serializable

    Permalink

    Use the factory methods multipart to conveniently create instances of this class.

    Use the factory methods multipart to conveniently create instances of this class. A part can be then further customised using fileName, contentType and header methods.

  17. case class MultipartBody(parts: Seq[Multipart]) extends RequestBody[Nothing] with Product with Serializable

    Permalink
  18. type PartialRequest[T, +S] = RequestT[Empty, T, S]

    Permalink
  19. type Request[T, +S] = RequestT[Identity, T, S]

    Permalink
  20. sealed trait RequestBody[+S] extends AnyRef

    Permalink
  21. case class RequestOptions(followRedirects: Boolean, readTimeout: Duration, maxRedirects: Int, redirectToGet: Boolean) extends Product with Serializable

    Permalink
  22. case class RequestT[U[_], T, +S](method: U[Method], uri: U[Uri], body: RequestBody[S], headers: Seq[(String, String)], response: ResponseAs[T, S], options: RequestOptions, tags: Map[String, Any]) extends RequestTExtensions[U, T, S] with Product with Serializable

    Permalink

    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.

    response

    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.

    tags

    Request-specific tags which can be used by backends for logging, metrics, etc. Not used by default.

  23. trait RequestTExtensions[U[_], T, +S] extends AnyRef

    Permalink
  24. case class Response[T](body: T, code: StatusCode, statusText: String, headers: Seq[(String, String)], history: List[Response[Unit]]) extends ResponseExtensions[T] with ResponseMetadata with Product with Serializable

    Permalink

    history

    If redirects are followed, and there were redirects, contains responses for the intermediate requests. The first response (oldest) comes first.

  25. sealed trait ResponseAs[T, +S] extends AnyRef

    Permalink

    T

    Target type as which the response will be read.

    S

    If T is a stream, the type of the stream. Otherwise, Nothing.

  26. case class ResponseAsFile(output: SttpFile, overwrite: Boolean) extends BasicResponseAs[SttpFile, Nothing] with Product with Serializable

    Permalink
  27. case class ResponseAsFromMetadata[T, S](f: (ResponseMetadata) ⇒ ResponseAs[T, S]) extends ResponseAs[T, S] with Product with Serializable

    Permalink
  28. case class ResponseAsStream[T, S]()(implicit responseIsStream: =:=[S, T]) extends BasicResponseAs[T, S] with Product with Serializable

    Permalink
  29. sealed abstract class ResponseError[+T] extends Exception

    Permalink
  30. trait ResponseExtensions[T] extends AnyRef

    Permalink
  31. trait ResponseMetadata extends AnyRef

    Permalink
  32. class SpecifyAuthScheme[U[_], T, +S] extends AnyRef

    Permalink
  33. case class StreamBody[S](s: S) extends RequestBody[S] with Product with Serializable

    Permalink
  34. case class StringBody(s: String, encoding: String, defaultContentType: Option[String] = Some(MediaTypes.Text)) extends BasicRequestBody with Product with Serializable

    Permalink
  35. trait SttpApi extends SttpExtensions

    Permalink
  36. trait SttpBackend[R[_], -S] extends AnyRef

    Permalink

    R

    The type constructor in which responses are wrapped. E.g. Id for synchronous backends, Future for asynchronous backends.

    S

    The type of streams that are supported by the backend. Nothing, if streaming requests/responses is not supported by this backend.

  37. case class SttpBackendOptions(connectionTimeout: FiniteDuration, proxy: Option[Proxy]) extends Product with Serializable

    Permalink
  38. trait SttpExtensions extends AnyRef

    Permalink
  39. case class TooManyRedirectsException(uri: Uri, redirects: Int) extends Exception with Product with Serializable

    Permalink
  40. class TryBackend[S] extends SttpBackend[Try, S]

    Permalink

    A synchronous backend that safely wraps SttpBackend exceptions in Try's

    A synchronous backend that safely wraps SttpBackend exceptions in Try's

    S

    The type of streams that are supported by the backend. Nothing, if streaming requests/responses is not supported by this backend.

  41. case class Uri(scheme: String, userInfo: Option[UserInfo], host: String, port: Option[Int], path: Seq[String], queryFragments: Seq[QueryFragment], fragment: Option[String]) extends Product with Serializable

    Permalink

    A URI.

    A URI. All components (scheme, host, query, ...) are stored unencoded, and become encoded upon serialization (using toString).

    queryFragments

    Either key-value pairs, single values, or plain query fragments. Key value pairs will be serialized as k=v, and blocks of key-value pairs/single values will be combined using &. Note that no & or other separators are added around plain query fragments - if required, they need to be added manually as part of the plain query fragment.

  42. implicit class UriContext extends AnyRef

    Permalink
    Definition Classes
    SttpApi

Value Members

  1. object AbstractCurlBackend

    Permalink
  2. object CurlBackend

    Permalink
  3. object CurlTryBackend

    Permalink
  4. val DefaultReadTimeout: Duration

    Permalink
    Definition Classes
    SttpApi
  5. object FileHelpers

    Permalink
  6. object FollowRedirectsBackend

    Permalink
  7. object IgnoreResponse extends BasicResponseAs[Unit, Nothing] with Product with Serializable

    Permalink
  8. object NoBody extends RequestBody[Nothing] with Product with Serializable

    Permalink
  9. object RequestBody

    Permalink
  10. object RequestT extends Serializable

    Permalink
  11. object Response extends Serializable

    Permalink
  12. object ResponseAs

    Permalink
  13. object ResponseAsByteArray extends BasicResponseAs[Array[Byte], Nothing] with Product with Serializable

    Permalink
  14. object ResponseMetadata

    Permalink
  15. object Rfc3986

    Permalink
  16. object Rfc3986Compatibility

    Permalink
  17. object SttpBackendOptions extends Serializable

    Permalink
  18. object Uri extends Serializable

    Permalink
  19. object UriInterpolator

    Permalink
  20. def asByteArray: ResponseAs[Either[String, Array[Byte]], Nothing]

    Permalink
    Definition Classes
    SttpApi
  21. def asByteArrayAlways: ResponseAs[Array[Byte], Nothing]

    Permalink
    Definition Classes
    SttpApi
  22. def asEither[L, R, S](onError: ResponseAs[L, S], onSuccess: ResponseAs[R, S]): ResponseAs[Either[L, R], S]

    Permalink
    Definition Classes
    SttpApi
  23. def asFile(file: File, overwrite: Boolean = false): ResponseAs[Either[String, File], Nothing]

    Permalink
    Definition Classes
    SttpExtensions
  24. def asParams(charset: String): ResponseAs[Either[String, Seq[(String, String)]], Nothing]

    Permalink

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

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

    Definition Classes
    SttpApi
  25. def asParams: ResponseAs[Either[String, Seq[(String, String)]], Nothing]

    Permalink

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

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

    Definition Classes
    SttpApi
  26. def asPath(path: Path, overwrite: Boolean = false): ResponseAs[Either[String, Path], Nothing]

    Permalink
    Definition Classes
    SttpExtensions
  27. def asStream[S]: ResponseAs[Either[String, S], S]

    Permalink
    Definition Classes
    SttpApi
  28. def asStreamAlways[S]: ResponseAs[S, S]

    Permalink
    Definition Classes
    SttpApi
  29. def asString(charset: String): ResponseAs[Either[String, String], Nothing]

    Permalink

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

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

    Definition Classes
    SttpApi
  30. def asString: ResponseAs[Either[String, String], Nothing]

    Permalink

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

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

    Definition Classes
    SttpApi
  31. def asStringAlways(charset: String): ResponseAs[String, Nothing]

    Permalink
    Definition Classes
    SttpApi
  32. def asStringAlways: ResponseAs[String, Nothing]

    Permalink

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

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

    Definition Classes
    SttpApi
  33. val basicRequest: RequestT[Empty, Either[String, String], Nothing]

    Permalink

    A starting request, with the following modifications comparing to emptyRequest:

    A starting request, with the following modifications comparing to emptyRequest:

    - Accept-Encoding set to gzip, deflate (handled automatically by the library)

    Definition Classes
    SttpApi
  34. package curl

    Permalink
  35. val emptyRequest: RequestT[Empty, Either[String, String], Nothing]

    Permalink

    An empty request with no headers.

    An empty request with no headers.

    Definition Classes
    SttpApi
  36. def fromMetadata[T, S](f: (ResponseMetadata) ⇒ ResponseAs[T, S]): ResponseAs[T, S]

    Permalink
    Definition Classes
    SttpApi
  37. def ignore: ResponseAs[Unit, Nothing]

    Permalink
    Definition Classes
    SttpApi
  38. package internal

    Permalink
  39. package monad

    Permalink
  40. def multipart[B](name: String, b: B)(implicit arg0: BodySerializer[B]): Multipart

    Permalink

    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.

    Definition Classes
    SttpApi
  41. def multipart(name: String, fs: Seq[(String, String)], encoding: String): Multipart

    Permalink

    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.

    Definition Classes
    SttpApi
  42. def multipart(name: String, fs: Seq[(String, String)]): Multipart

    Permalink

    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.

    Definition Classes
    SttpApi
  43. def multipart(name: String, fs: Map[String, String], encoding: String): Multipart

    Permalink

    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.

    Definition Classes
    SttpApi
  44. def multipart(name: String, fs: Map[String, String]): Multipart

    Permalink

    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.

    Definition Classes
    SttpApi
  45. def multipart(name: String, data: InputStream): Multipart

    Permalink

    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.

    Definition Classes
    SttpApi
  46. def multipart(name: String, data: ByteBuffer): Multipart

    Permalink

    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.

    Definition Classes
    SttpApi
  47. def multipart(name: String, data: Array[Byte]): Multipart

    Permalink

    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.

    Definition Classes
    SttpApi
  48. def multipart(name: String, data: String, encoding: String): Multipart

    Permalink

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

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

    Definition Classes
    SttpApi
  49. def multipart(name: String, data: String): Multipart

    Permalink

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

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

    Definition Classes
    SttpApi
  50. def multipartFile(name: String, data: Path): Multipart

    Permalink

    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
  51. def multipartFile(name: String, data: File): Multipart

    Permalink

    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
  52. object quick extends SttpApi

    Permalink
  53. package testing

    Permalink

Inherited from SttpApi

Inherited from SttpExtensions

Inherited from AnyRef

Inherited from Any

Ungrouped