Package

com.softwaremill

sttp

Permalink

package sttp

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. sttp
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. 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. Handlers might also provide special logic for serializer instances which they define (e.g. to handle streaming).

  2. case class Cookie(name: String, value: String, expires: Option[ZonedDateTime] = None, maxAge: Option[Long] = None, domain: Option[String] = None, path: Option[String] = None, secure: Boolean = false, httpOnly: Boolean = false) extends Product with Serializable

    Permalink
  3. type Empty[X] = None.type

    Permalink
  4. class FutureMonad extends MonadAsyncError[Future]

    Permalink
  5. type Id[X] = X

    Permalink
  6. trait MonadAsyncError[R[_]] extends MonadError[R]

    Permalink
  7. trait MonadError[R[_]] extends AnyRef

    Permalink
  8. case class MultiPart(name: String, data: 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.

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

    Permalink
  10. type Request[T, +S] = RequestT[Id, T, S]

    Permalink
  11. 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

    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.

  12. case class Response[T](body: T, code: Int, headers: Seq[(String, String)]) extends Product with Serializable

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

    Permalink
  14. trait SttpHandler[R[_], -S] extends AnyRef

    Permalink

    R

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

    S

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

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

  16. implicit final class UriContext extends AnyVal

    Permalink

Value Members

  1. object Cookie extends Serializable

    Permalink
  2. object HttpURLConnectionSttpHandler extends SttpHandler[Id, Nothing]

    Permalink
  3. object IdMonad extends MonadError[Id]

    Permalink
  4. object Uri extends Serializable

    Permalink
  5. object UriInterpolator

    Permalink
  6. def asByteArray: ResponseAs[Array[Byte], Nothing]

    Permalink
  7. def asFile(file: File, overwrite: Boolean = false): ResponseAs[File, Nothing]

    Permalink
  8. def asParams(encoding: String): ResponseAs[Seq[(String, String)], Nothing]

    Permalink
  9. def asParams: ResponseAs[Seq[(String, String)], Nothing]

    Permalink

    Uses utf-8 encoding.

  10. def asPath(path: Path, overwrite: Boolean = false): ResponseAs[Path, Nothing]

    Permalink
  11. def asStream[S]: ResponseAs[S, S]

    Permalink
  12. def asString(encoding: String): ResponseAs[String, Nothing]

    Permalink
  13. def asString: ResponseAs[String, Nothing]

    Permalink

    Uses utf-8 encoding.

  14. val emptyRequest: RequestT[Empty, String, Nothing]

    Permalink

    An empty request with no headers.

  15. def ignore: ResponseAs[Unit, Nothing]

    Permalink
  16. package model

    Permalink
  17. def multiPart(name: String, data: Path): MultiPart

    Permalink

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

  18. def multiPart(name: String, data: File): MultiPart

    Permalink

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

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

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

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

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

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

  24. val sttp: RequestT[Empty, 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)

Inherited from AnyRef

Inherited from Any

Ungrouped