p

sttp

client4

package client4

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

Type Members

  1. trait Backend[F[_]] extends GenericBackend[F, Any]

    A GenericBackend which doesn't support any capabilities, and uses F to represent side-effects.

  2. case class BackendOptions(connectionTimeout: FiniteDuration, proxy: Option[Proxy]) extends Product with Serializable
  3. sealed trait BasicBody extends GenericRequestBody[Any]
  4. sealed trait BasicBodyPart extends BasicBody with BodyPart[Any]
  5. case class BasicMultipartBody(parts: Seq[Part[BasicBodyPart]]) extends MultipartBody[Any] with BasicBody with Product with Serializable
  6. sealed trait BodyPart[-S] extends GenericRequestBody[S]
  7. type BodySerializer[B] = (B) ⇒ BasicBodyPart

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

  8. case class ByteArrayBody(b: Array[Byte], defaultContentType: MediaType = MediaType.ApplicationOctetStream) extends BasicBodyPart with Product with Serializable
  9. case class ByteBufferBody(b: ByteBuffer, defaultContentType: MediaType = MediaType.ApplicationOctetStream) extends BasicBodyPart with Product with Serializable
  10. case class ConditionalResponseAs[+R](condition: (ResponseMetadata) ⇒ Boolean, responseAs: R) extends Product with Serializable

    A wrapper around a ResponseAs to supplement it with a condition on the response metadata.

    A wrapper around a ResponseAs to supplement it with a condition on the response metadata.

    Used in SttpApi.fromMetadata() to condition the response handler upon the response metadata: status code, headers, etc.

    R

    The type of response

  11. case class DeserializationException[DE](body: String, error: DE)(implicit evidence$1: ShowError[DE]) extends ResponseException[Nothing, DE] with Product with Serializable
  12. case class FileBody(f: SttpFile, defaultContentType: MediaType = MediaType.ApplicationOctetStream) extends BasicBodyPart with Product with Serializable
  13. trait GenericBackend[F[_], +P] extends AnyRef

    A specific implementation of HTTP request sending logic.

    A specific implementation of HTTP request sending logic.

    The send method should not be used directly by client code, if possible. Instead, the Request.send, StreamRequest.send, WebSocketRequest.send or WebSocketStreamRequest.send methods (depending on the type of the request) should be used, providing a specific backend instance as a parameter.

    When creating an instance of a backend, one of the Backend traits should be mixed in, reflecting the effect type and the P capabilities: Backend, SyncBackend, WebSocketBackend, WebSocketSyncBackend, StreamBackend, WebSocketStreamBackend. This is required in order to provide a better developer experience when sending requests: the resulting type has less type parameters.

    F

    The effect type used to represent side-effects, such as obtaining the response for a request. E.g. Identity for synchronous backends, scala.concurrent.Future for asynchronous backends.

    P

    Capabilities supported by this backend, in addition to Effect. This might be Any (no special capabilities), subtype of sttp.capabilities.Streams (the ability to send and receive streaming bodies) or WebSockets (the ability to handle websocket requests).

    Note

    Backends should try to classify known HTTP-related exceptions into one of the categories specified by SttpClientException. Other exceptions are thrown unchanged.

  14. trait GenericRequest[+T, -R] extends RequestBuilder[GenericRequest[T, R]] with RequestMetadata

    A generic description of an HTTP request, along with a description of how the response body should be handled.

    A generic description of an HTTP request, along with a description of how the response body should be handled.

    Client code should use concrete subtypes of this trait. The Request.send, StreamRequest.send, WebSocketRequest.send or WebSocketStreamRequest.send methods should be used to send the request, providing an instance of the appropriate Backend subtype.

    However, the request can aso be sent using the GenericBackend.send method, which provides a superset of the required capabilities.

    T

    The target type, to which the response body should be read.

    R

    The backend capabilities required by the request or response description. This might be Any (no requirements), sttp.capabilities.Effect (the backend must support the given effect type), sttp.capabilities.Streams (the ability to send and receive streaming bodies) or sttp.capabilities.WebSockets (the ability to handle websocket requests).

  15. sealed trait GenericRequestBody[-R] extends AnyRef
  16. sealed trait GenericResponseAs[+T, -R] extends AnyRef

    Generic description of how the response to a GenericRequest should be handled.

    Generic description of how the response to a GenericRequest should be handled. To set on a request, should be wrapped with an appropriate subtype of ResponseAsDelegate, depending on the R capabilities.

    T

    Target type as which the response will be read.

    R

    The backend capabilities required by the response description. This might be Any (no requirements), Effect (the backend must support the given effect type), Streams (the ability to send and receive streaming bodies) or WebSockets (the ability to handle websocket requests).

  17. sealed trait GenericWebSocketResponseAs[T, -R] extends GenericResponseAs[T, R]
  18. case class HttpError[HE](body: HE, statusCode: StatusCode) extends ResponseException[HE, Nothing] with Product with Serializable
  19. type Identity[+X] = X
  20. case class InputStreamBody(b: InputStream, defaultContentType: MediaType = MediaType.ApplicationOctetStream) extends BasicBodyPart with Product with Serializable
  21. case class MappedResponseAs[T, T2, R](raw: GenericResponseAs[T, R], g: (T, ResponseMetadata) ⇒ T2, showAs: Option[String]) extends GenericResponseAs[T2, R] with Product with Serializable
  22. sealed trait MultipartBody[S] extends GenericRequestBody[S]
  23. case class MultipartStreamBody[S](parts: Seq[Part[BodyPart[S]]]) extends MultipartBody[S] with Product with Serializable
  24. final case class PartialRequest[T](body: BasicBody, headers: Seq[Header], response: ResponseAs[T], options: RequestOptions, tags: Map[String, Any]) extends PartialRequestBuilder[PartialRequest[T], Request[T]] with Product with Serializable

    Describes a partial HTTP request, along with a description of how the response body should be handled.

    Describes a partial HTTP request, along with a description of how the response body should be handled. A partial request cannot be sent because the method and uri are not yet specified.

    T

    The target type, to which the response body should be read.

    response

    Description of how the response body should be handled. Needs to be specified upfront so that the response is always consumed and hence there are no requirements on client code to consume it.

    tags

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

  25. trait PartialRequestBuilder[+PR <: PartialRequestBuilder[PR, R], +R] extends HasHeaders with PartialRequestExtensions[PR]

    The builder methods of requests or partial requests of type PR.

    The builder methods of requests or partial requests of type PR.

    PR

    The type of the request or partial request. The method and uri may not be specified yet.

    R

    The type of request when the method and uri are specified.

  26. trait PartialRequestExtensions[+R <: PartialRequestBuilder[R, _]] extends AnyRef
  27. case class Request[T](method: Method, uri: Uri, body: BasicBody, headers: Seq[Header], response: ResponseAs[T], options: RequestOptions, tags: Map[String, Any]) extends GenericRequest[T, Any] with RequestBuilder[Request[T]] with Product with Serializable

    Describes an HTTP request, along with a description of how the response body should be handled.

    Describes an HTTP request, along with a description of how the response body should be handled.

    The request can be sent using an instance of SyncBackend or Backend with the send method.

    T

    The target type, to which the response body should be read.

    response

    Description of how the response body should be handled. Needs to be specified upfront so that the response is always consumed and hence there are no requirements on client code to consume it.

    tags

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

  28. trait RequestBuilder[+R <: RequestBuilder[R]] extends PartialRequestBuilder[R, R]

    The builder methods of a request.

    The builder methods of a request. The uri and method are specified.

    R

    The type of request

  29. case class RequestOptions(followRedirects: Boolean, readTimeout: Duration, maxRedirects: Int, redirectToGet: Boolean) extends Product with Serializable
  30. case class Response[+T](body: T, code: StatusCode, statusText: String, headers: Seq[Header], history: List[Response[Unit]], request: RequestMetadata) extends ResponseMetadata with Product with Serializable

    history

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

  31. case class ResponseAs[+T](delegate: GenericResponseAs[T, Any]) extends ResponseAsDelegate[T, Any] with Product with Serializable

    Describes how the response body of a Request should be handled.

    Describes how the response body of a Request should be handled.

    Apart from the basic cases (ignoring, reading as a byte array or file), response body descriptions can be mapped over, to support custom types. The mapping can take into account the ResponseMetadata, that is the headers and status code. Responses can also be handled depending on the response metadata. Finally, two response body descriptions can be combined (with some restrictions).

    A number of as<Type> helper methods are available as part of SttpApi and when importing sttp.client4._.

    T

    Target type as which the response will be read.

  32. case class ResponseAsBoth[A, B, R](l: GenericResponseAs[A, R], r: GenericResponseAs[B, Any]) extends GenericResponseAs[(A, Option[B]), R] with Product with Serializable
  33. trait ResponseAsDelegate[+T, -R] extends AnyRef

    Describes how the response body of a request should be handled.

    Describes how the response body of a request should be handled. A number of as<Type> helper methods are available as part of SttpApi and when importing sttp.client4._. These methods yield specific implementations of this trait, which can then be set on a Request, StreamRequest, WebSocketRequest or WebSocketStreamRequest, depending on the response type.

    T

    Target type as which the response will be read.

    R

    The backend capabilities required by the response description. This might be Any (no requirements), sttp.capabilities.Effect (the backend must support the given effect type), sttp.capabilities.Streams (the ability to send and receive streaming bodies) or sttp.capabilities.WebSockets (the ability to handle websocket requests).

  34. case class ResponseAsFile(output: SttpFile) extends GenericResponseAs[SttpFile, Any] with Product with Serializable
  35. case class ResponseAsFromMetadata[T, R](conditions: List[ConditionalResponseAs[GenericResponseAs[T, R]]], default: GenericResponseAs[T, R]) extends GenericResponseAs[T, R] with Product with Serializable
  36. case class ResponseAsStream[F[_], T, Stream, S] extends GenericResponseAs[T, S with Effect[F]] with Product with Serializable
  37. case class ResponseAsStreamUnsafe[BinaryStream, S] extends GenericResponseAs[BinaryStream, S] with Product with Serializable
  38. case class ResponseAsWebSocket[F[_], T](f: (WebSocket[F], ResponseMetadata) ⇒ F[T]) extends GenericWebSocketResponseAs[T, WebSockets with Effect[F]] with Product with Serializable
  39. case class ResponseAsWebSocketStream[S, Pipe[_, _]](s: Streams[S], p: Pipe[Data[_], WebSocketFrame]) extends GenericWebSocketResponseAs[Unit, S with WebSockets] with Product with Serializable
  40. case class ResponseAsWebSocketUnsafe[F[_]]() extends GenericWebSocketResponseAs[WebSocket[F], WebSockets with Effect[F]] with Product with Serializable
  41. sealed abstract class ResponseException[+HE, +DE] extends Exception
  42. type RetryWhen = (GenericRequest[_, _], Either[Throwable, Response[_]]) ⇒ Boolean
  43. trait ShowError[-T] extends AnyRef
  44. class SpecifyAuthScheme[+R <: PartialRequestBuilder[R, _]] extends AnyRef
  45. trait StreamBackend[F[_], +S] extends Backend[F] with GenericBackend[F, S]

    A GenericBackend which supports streams of type S and uses F to represent side-effects.

  46. case class StreamBody[BinaryStream, S] extends BodyPart[S] with Product with Serializable
  47. final case class StreamRequest[T, R](method: Method, uri: Uri, body: GenericRequestBody[R], headers: Seq[Header], response: StreamResponseAs[T, R], options: RequestOptions, tags: Map[String, Any]) extends GenericRequest[T, R] with RequestBuilder[StreamRequest[T, R]] with Product with Serializable

    Describes an HTTP request, along with a description of how the response body should be handled.

    Describes an HTTP request, along with a description of how the response body should be handled. Either the request or response body uses non-blocking, asynchronous streams.

    The request can be sent using an instance of StreamBackend with the send method.

    T

    The target type, to which the response body should be read. If the response body is streamed, this might be the value obtained by processing the entire stream.

    R

    The capabilities required to send this request: a subtype of Streams, and optionally an Effect.

    response

    Description of how the response body should be handled. Needs to be specified upfront so that the response is always consumed and hence there are no requirements on client code to consume it.

    tags

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

  48. case class StreamResponseAs[+T, S](delegate: GenericResponseAs[T, S]) extends ResponseAsDelegate[T, S] with Product with Serializable

    Describes how the response body of a StreamRequest should be handled.

    Describes how the response body of a StreamRequest should be handled.

    The stream response can be mapped over, to support custom types. The mapping can take into account the ResponseMetadata, that is the headers and status code.

    A number of asStream[Type] helper methods are available as part of SttpApi and when importing sttp.client4._.

    T

    Target type as which the response will be read.

    S

    The type of stream, used to receive the response body bodies.

  49. case class StringBody(s: String, encoding: String, defaultContentType: MediaType = MediaType.TextPlain) extends BasicBodyPart with Product with Serializable
  50. trait SttpApi extends SttpExtensions with UriInterpolator
  51. abstract class SttpClientException extends Exception

    Known exceptions that might occur when using a backend.

    Known exceptions that might occur when using a backend. Currently this covers:

    • connect exceptions: when a connection (tcp socket) can't be established to the target host
    • read exceptions: when a connection has been established, but there's any kind of problem receiving or handling the response (e.g. a broken socket or a deserialization error)

    In general, it's safe to assume that the request hasn't been sent in case of connect exceptions. With read exceptions, the target host might or might have not received and processed the request.

    The Backend.send methods might also throw other exceptions, due to programming errors, bugs in the underlying implementations, bugs in sttp or an uncovered exception.

  52. trait SttpClientExceptionExtensions extends AnyRef
  53. trait SttpExtensions extends AnyRef
  54. trait SttpWebSocketAsyncApi extends AnyRef
  55. trait SttpWebSocketStreamApi extends AnyRef
  56. trait SttpWebSocketSyncApi extends AnyRef
  57. trait SyncBackend extends Backend[Identity]

    A GenericBackend which is synchronous (side effects are run directly), and doesn't support any capabilities.

  58. implicit class UriContext extends AnyRef
    Definition Classes
    UriInterpolator
  59. trait WebSocketBackend[F[_]] extends Backend[F] with GenericBackend[F, WebSockets]

    A GenericBackend which supports web sockets and uses F to represent side-effects.

  60. final case class WebSocketRequest[F[_], T](method: Method, uri: Uri, body: BasicBody, headers: Seq[Header], response: WebSocketResponseAs[F, T], options: RequestOptions, tags: Map[String, Any]) extends GenericRequest[T, WebSockets with Effect[F]] with RequestBuilder[WebSocketRequest[F, T]] with Product with Serializable

    Describes an HTTP WebSocket request.

    Describes an HTTP WebSocket request.

    The request can be sent using an instance of WebSocketBackend with the send method.

    F

    The effect type used to process the WebSocket. Might include asynchronous computations (e.g. scala.concurrent.Future), pure effect descriptions (IO), or synchronous computations (Identity).

    T

    The target type, to which the response body should be read. If the WebSocket interactions are described entirely by the response description, this might be Unit. Otherwise, this can be a sttp.ws.WebSocket instance.

    response

    Description of how the WebSocket should be handled. Needs to be specified upfront so that the response is always consumed and hence there are no requirements on client code to consume it.

    tags

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

  61. case class WebSocketResponseAs[F[_], +T](delegate: GenericResponseAs[T, Effect[F] with WebSockets]) extends ResponseAsDelegate[T, Effect[F] with WebSockets] with Product with Serializable

    Describes how the response of a WebSocketRequest should be handled.

    Describes how the response of a WebSocketRequest should be handled.

    The websocket response can be mapped over, to support custom types. The mapping can take into account the ResponseMetadata, that is the headers and status code. Responses can also be handled depending on the response metadata.

    A number of asWebSocket helper methods are available as part of SttpApi and when importing sttp.client4._.

    T

    Target type as which the response will be read.

  62. trait WebSocketStreamBackend[F[_], S] extends WebSocketBackend[F] with StreamBackend[F, S] with GenericBackend[F, S with WebSockets]

    A GenericBackend which supports websockets, streams of type S and uses F to represent side-effects.

  63. final case class WebSocketStreamRequest[T, S](method: Method, uri: Uri, body: GenericRequestBody[S], headers: Seq[Header], response: WebSocketStreamResponseAs[T, S], options: RequestOptions, tags: Map[String, Any]) extends GenericRequest[T, S with WebSockets] with RequestBuilder[WebSocketStreamRequest[T, S]] with Product with Serializable

    Describes an HTTP WebSocket request.

    Describes an HTTP WebSocket request. Either the request body, or the WebSocket handling uses non-blocking, asynchronous streams.

    The request can be sent using an instance of WebSocketStreamBackend with the send method.

    T

    The target type, to which the response body should be read. If the WebSocket interactions are described entirely by the response description, this might be Unit. Otherwise, this can be an S stream of frames or mapped WebSocket messages.

    S

    The stream capability required to send this request, a subtype of Streams.

    response

    Description of how the WebSocket should be handled. Needs to be specified upfront so that the response is always consumed and hence there are no requirements on client code to consume it.

    tags

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

  64. case class WebSocketStreamResponseAs[+T, S](delegate: GenericResponseAs[T, S with WebSockets]) extends ResponseAsDelegate[T, S with WebSockets] with Product with Serializable

    Describes how the response of a WebSocketStreamRequest should be handled.

    Describes how the response of a WebSocketStreamRequest should be handled.

    The websocket response can be mapped over, to support custom types. The mapping can take into account the ResponseMetadata, that is the headers and status code. Responses can also be handled depending on the response metadata.

    A number of asWebSocket helper methods are available as part of SttpApi and when importing sttp.client4._.

    T

    Target type as which the response will be read.

  65. trait WebSocketSyncBackend extends SyncBackend with WebSocketBackend[Identity]

    A GenericBackend which is synchronous (side effects are run directly), and supports web sockets.

Value Members

  1. val DefaultReadTimeout: Duration
    Definition Classes
    SttpApi
  2. def asBoth[A, B](l: ResponseAs[A], r: ResponseAs[B]): ResponseAs[(A, B)]

    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.

    Definition Classes
    SttpApi
  3. def asBothOption[A, B, S](l: StreamResponseAs[A, S], r: ResponseAs[B]): StreamResponseAs[(A, Option[B]), S]

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

    Definition Classes
    SttpApi
  4. def asBothOption[A, B](l: ResponseAs[A], r: ResponseAs[B]): ResponseAs[(A, Option[B])]

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

    Definition Classes
    SttpApi
  5. def asByteArray: ResponseAs[Either[String, Array[Byte]]]
    Definition Classes
    SttpApi
  6. def asByteArrayAlways: ResponseAs[Array[Byte]]
    Definition Classes
    SttpApi
  7. def asEither[A, B, S](onError: ResponseAs[A], onSuccess: StreamResponseAs[B, S]): StreamResponseAs[Either[A, B], S]

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

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

    Definition Classes
    SttpApi
  8. def asEither[A, B](onError: ResponseAs[A], onSuccess: ResponseAs[B]): ResponseAs[Either[A, B]]

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

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

    Definition Classes
    SttpApi
  9. def asFile(file: File): ResponseAs[Either[String, File]]
    Definition Classes
    SttpExtensions
  10. def asFileAlways(file: File): ResponseAs[File]
    Definition Classes
    SttpExtensions
  11. def asParams(charset: String): ResponseAs[Either[String, Seq[(String, String)]]]

    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
  12. def asParams: ResponseAs[Either[String, Seq[(String, String)]]]

    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
  13. def asParamsAlways(charset: String): ResponseAs[Seq[(String, String)]]

    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
  14. def asParamsAlways: ResponseAs[Seq[(String, String)]]

    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
  15. def asPath(path: Path): ResponseAs[Either[String, Path]]
    Definition Classes
    SttpExtensions
  16. def asPathAlways(path: Path): ResponseAs[Path]
    Definition Classes
    SttpExtensions
  17. def asStream[F[_], T, S](s: Streams[S])(f: (BinaryStream) ⇒ F[T]): StreamResponseAs[Either[String, T], S with Effect[F]]
    Definition Classes
    SttpApi
  18. def asStreamAlways[F[_], T, S](s: Streams[S])(f: (BinaryStream) ⇒ F[T]): StreamResponseAs[T, S with Effect[F]]
    Definition Classes
    SttpApi
  19. def asStreamAlwaysUnsafe[S](s: Streams[S]): StreamResponseAs[BinaryStream, S]
    Definition Classes
    SttpApi
  20. def asStreamAlwaysWithMetadata[F[_], T, S](s: Streams[S])(f: (BinaryStream, ResponseMetadata) ⇒ F[T]): StreamResponseAs[T, S with Effect[F]]
    Definition Classes
    SttpApi
  21. def asStreamUnsafe[S](s: Streams[S]): StreamResponseAs[Either[String, BinaryStream], S]
    Definition Classes
    SttpApi
  22. def asStreamWithMetadata[F[_], T, S](s: Streams[S])(f: (BinaryStream, ResponseMetadata) ⇒ F[T]): StreamResponseAs[Either[String, T], S with Effect[F]]
    Definition Classes
    SttpApi
  23. def asString(charset: String): ResponseAs[Either[String, String]]

    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
  24. def asString: ResponseAs[Either[String, String]]

    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
  25. def asStringAlways(charset: String): ResponseAs[String]
    Definition Classes
    SttpApi
  26. def asStringAlways: ResponseAs[String]

    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
  27. val basicRequest: PartialRequest[Either[String, String]]

    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.

    Definition Classes
    SttpApi
  28. val emptyRequest: PartialRequest[Either[String, String]]

    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.

    Definition Classes
    SttpApi
  29. def fromMetadata[T, S](default: ResponseAs[T], conditions: ConditionalResponseAs[StreamResponseAs[T, S]]*): StreamResponseAs[T, S]
    Definition Classes
    SttpApi
  30. def fromMetadata[T](default: ResponseAs[T], conditions: ConditionalResponseAs[ResponseAs[T]]*): ResponseAs[T]
    Definition Classes
    SttpApi
  31. def ignore: ResponseAs[Unit]
    Definition Classes
    SttpApi
  32. def multipart[B](name: String, b: B)(implicit arg0: BodySerializer[B]): Part[BasicBodyPart]

    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
  33. def multipart(name: String, fs: Seq[(String, String)], encoding: String): Part[BasicBodyPart]

    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
  34. def multipart(name: String, fs: Seq[(String, String)]): Part[BasicBodyPart]

    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
  35. def multipart(name: String, fs: Map[String, String], encoding: String): Part[BasicBodyPart]

    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
  36. def multipart(name: String, fs: Map[String, String]): Part[BasicBodyPart]

    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
  37. def multipart(name: String, data: InputStream): Part[BasicBodyPart]

    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
  38. def multipart(name: String, data: ByteBuffer): Part[BasicBodyPart]

    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
  39. def multipart(name: String, data: Array[Byte]): Part[BasicBodyPart]

    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
  40. def multipart(name: String, data: String, encoding: String): Part[BasicBodyPart]

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

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

    Definition Classes
    SttpApi
  41. def multipart(name: String, data: String): Part[BasicBodyPart]

    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
  42. def multipartFile(name: String, data: Path): Part[BasicBodyPart]

    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
  43. def multipartFile(name: String, data: File): Part[BasicBodyPart]

    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
  44. def multipartStream[S](s: Streams[S])(name: String, b: BinaryStream): Part[StreamBody[BinaryStream, S]]

    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
  45. val quickRequest: PartialRequest[String]

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

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

    Definition Classes
    SttpApi
  46. object BackendOptions extends Serializable
  47. object BasicBody
  48. object DefaultFutureBackend
  49. object DefaultSyncBackend
  50. object GenericResponseAs
  51. object HttpError extends Serializable
  52. object IgnoreResponse extends GenericResponseAs[Unit, Any] with Product with Serializable
  53. object NoBody extends BasicBody with Product with Serializable
  54. object Request extends Serializable
  55. object Response extends Serializable
  56. object ResponseAs extends Serializable
  57. object ResponseAsByteArray extends GenericResponseAs[Array[Byte], Any] with Product with Serializable
  58. object ResponseAsStream extends Serializable
  59. object ResponseAsStreamUnsafe extends Serializable
  60. object RetryWhen
  61. object ShowError
  62. object StreamBody extends Serializable
  63. object SttpClientException extends SttpClientExceptionExtensions with Serializable
  64. object SttpExtensions
  65. object quick extends SttpApi

Inherited from SttpApi

Inherited from UriInterpolator

Inherited from SttpExtensions

Inherited from AnyRef

Inherited from Any

Ungrouped