trait SttpApi extends SttpExtensions with UriInterpolator
- Alphabetic
- By Inheritance
- SttpApi
- UriInterpolator
- SttpExtensions
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val DefaultReadTimeout: Duration
- def asByteArray: ResponseAs[Either[String, Array[Byte]], Nothing]
- def asByteArrayAlways: ResponseAs[Array[Byte], Nothing]
- def asEither[L, R, S](onError: ResponseAs[L, S], onSuccess: ResponseAs[R, S]): ResponseAs[Either[L, R], S]
- def asFile(file: File): ResponseAs[Either[String, File], Nothing]
- Definition Classes
- SttpExtensions
- def asFileAlways(file: File): ResponseAs[File, Nothing]
- Definition Classes
- SttpExtensions
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asParams(charset: String): ResponseAs[Either[String, Seq[(String, String)]], Nothing]
Use the given charset by default, unless specified otherwise in the response headers.
- def asParams: ResponseAs[Either[String, Seq[(String, String)]], Nothing]
Use the
utf-8
charset by default, unless specified otherwise in the response headers. - def asPath(path: Path): ResponseAs[Either[String, Path], Nothing]
- Definition Classes
- SttpExtensions
- def asPathAlways(path: Path): ResponseAs[Path, Nothing]
- Definition Classes
- SttpExtensions
- def asStream[S]: ResponseAs[Either[String, S], S]
- def asStreamAlways[S]: ResponseAs[S, S]
- def asString(charset: String): ResponseAs[Either[String, String], Nothing]
Use the given charset by default, unless specified otherwise in the response headers.
- def asString: ResponseAs[Either[String, String], Nothing]
Use the
utf-8
charset by default, unless specified otherwise in the response headers. - def asStringAlways(charset: String): ResponseAs[String, Nothing]
- def asStringAlways: ResponseAs[String, Nothing]
Use the
utf-8
charset by default, unless specified otherwise in the response headers. - val basicRequest: RequestT[Empty, Either[String, String], Nothing]
A starting request, with the following modification comparing to
emptyRequest
:Accept-Encoding
is set togzip, deflate
(compression/decompression is handled automatically by the library).A starting request, with the following modification comparing to
emptyRequest
:Accept-Encoding
is set togzip, deflate
(compression/decompression is handled automatically by the library).Reads the response body as an
Either[String, String]
, whereLeft
is used if the status code is non-2xx, andRight
otherwise. - def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- val emptyRequest: RequestT[Empty, Either[String, String], Nothing]
An empty request with no headers.
An empty request with no headers.
Reads the response body as an
Either[String, String]
, whereLeft
is used if the status code is non-2xx, andRight
otherwise. - final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fromMetadata[T, S](f: (ResponseMetadata) => ResponseAs[T, S]): ResponseAs[T, S]
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def ignore: ResponseAs[Unit, Nothing]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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 thecontentType
method. - 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 thecontentType
method. - 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 thecontentType
method. - 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 thecontentType
method. - 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 thecontentType
method. - def multipart(name: String, data: InputStream): Part[BasicRequestBody]
Content type will be set to
application/octet-stream
, can be overridden later using thecontentType
method. - def multipart(name: String, data: ByteBuffer): Part[BasicRequestBody]
Content type will be set to
application/octet-stream
, can be overridden later using thecontentType
method. - def multipart(name: String, data: Array[Byte]): Part[BasicRequestBody]
Content type will be set to
application/octet-stream
, can be overridden later using thecontentType
method. - def multipart(name: String, data: String, encoding: String): Part[BasicRequestBody]
Content type will be set to
text/plain
withutf-8
encoding, can be overridden later using thecontentType
method. - def multipart(name: String, data: String): Part[BasicRequestBody]
Content type will be set to
text/plain
withutf-8
encoding, can be overridden later using thecontentType
method. - def multipartFile(name: String, data: Path): Part[BasicRequestBody]
Content type will be set to
application/octet-stream
, can be overridden later using thecontentType
method.Content type will be set to
application/octet-stream
, can be overridden later using thecontentType
method.File name will be set to the name of the file.
- Definition Classes
- SttpExtensions
- def multipartFile(name: String, data: File): Part[BasicRequestBody]
Content type will be set to
application/octet-stream
, can be overridden later using thecontentType
method.Content type will be set to
application/octet-stream
, can be overridden later using thecontentType
method.File name will be set to the name of the file.
- Definition Classes
- SttpExtensions
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val quickRequest: RequestT[Empty, String, Nothing]
A starting request which always reads the response body as a string, regardless of the status code.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])