object quick extends SttpApi
- Alphabetic
- By Inheritance
- quick
- SttpApi
- UriInterpolator
- SttpExtensions
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
implicit
class
UriContext extends AnyRef
- Definition Classes
- UriInterpolator
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
- Definition Classes
- SttpApi
-
def
asBoth[A, B](l: ResponseAs[A, Any], r: ResponseAs[B, Any]): ResponseAs[(A, B), Any]
Use both
l
andr
to read the response body.Use both
l
andr
to read the response body. Neither response specifications may use streaming or web sockets.- Definition Classes
- SttpApi
-
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 byl
is replayable (a file or byte array), also user
to read the response body. Otherwise ignorer
(if the raw body is a stream or a web socket).- Definition Classes
- SttpApi
-
def
asByteArray: ResponseAs[Either[String, Array[Byte]], Any]
- Definition Classes
- SttpApi
-
def
asByteArrayAlways: ResponseAs[Array[Byte], Any]
- Definition Classes
- SttpApi
-
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 theonError
specification otherwise.Uses the
onSuccess
response specification for successful responses (2xx), and theonError
specification otherwise.- Definition Classes
- SttpApi
-
def
asFile(file: File): ResponseAs[Either[String, File], Any]
- Definition Classes
- SttpExtensions
-
def
asFileAlways(file: File): ResponseAs[File, Any]
- Definition Classes
- SttpExtensions
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
asParams(charset: String): ResponseAs[Either[String, Seq[(String, String)]], Any]
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
-
def
asParams: ResponseAs[Either[String, Seq[(String, String)]], Any]
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
-
def
asParamsAlways(charset: String): ResponseAs[Seq[(String, String)], Any]
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
-
def
asParamsAlways: ResponseAs[Seq[(String, String)], Any]
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
-
def
asStream[F[_], T, S](s: Streams[S])(f: (BinaryStream) ⇒ F[T]): ResponseAs[Either[String, T], Effect[F] with S]
- Definition Classes
- SttpApi
-
def
asStreamAlways[F[_], T, S](s: Streams[S])(f: (BinaryStream) ⇒ F[T]): ResponseAs[T, Effect[F] with S]
- Definition Classes
- SttpApi
-
def
asStreamAlwaysUnsafe[S](s: Streams[S]): ResponseAs[BinaryStream, S]
- Definition Classes
- SttpApi
-
def
asStreamAlwaysWithMetadata[F[_], T, S](s: Streams[S])(f: (BinaryStream, ResponseMetadata) ⇒ F[T]): ResponseAs[T, Effect[F] with S]
- Definition Classes
- SttpApi
-
def
asStreamUnsafe[S](s: Streams[S]): ResponseAs[Either[String, BinaryStream], S]
- Definition Classes
- SttpApi
-
def
asStreamWithMetadata[F[_], T, S](s: Streams[S])(f: (BinaryStream, ResponseMetadata) ⇒ F[T]): ResponseAs[Either[String, T], Effect[F] with S]
- Definition Classes
- SttpApi
-
def
asString(charset: String): ResponseAs[Either[String, String], Any]
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
-
def
asString: ResponseAs[Either[String, String], Any]
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
-
def
asStringAlways(charset: String): ResponseAs[String, Any]
- Definition Classes
- SttpApi
-
def
asStringAlways: ResponseAs[String, Any]
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
-
def
asWebSocket[F[_], T](f: (WebSocket[F]) ⇒ F[T]): ResponseAs[Either[String, T], Effect[F] with WebSockets]
- Definition Classes
- SttpApi
-
def
asWebSocketAlways[F[_], T](f: (WebSocket[F]) ⇒ F[T]): ResponseAs[T, Effect[F] with WebSockets]
- Definition Classes
- SttpApi
-
def
asWebSocketAlwaysUnsafe[F[_]]: ResponseAs[WebSocket[F], Effect[F] with WebSockets]
- Definition Classes
- SttpApi
-
def
asWebSocketAlwaysWithMetadata[F[_], T](f: (WebSocket[F], ResponseMetadata) ⇒ F[T]): ResponseAs[T, Effect[F] with WebSockets]
- Definition Classes
- SttpApi
-
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 theonError
specification otherwise.Uses the
onSuccess
response specification for 101 responses (switching protocols), and theonError
specification otherwise.- Definition Classes
- SttpApi
-
def
asWebSocketStream[S](s: Streams[S])(p: Pipe[Data[_], WebSocketFrame]): ResponseAs[Either[String, Unit], S with WebSockets]
- Definition Classes
- SttpApi
-
def
asWebSocketStreamAlways[S](s: Streams[S])(p: Pipe[Data[_], WebSocketFrame]): ResponseAs[Unit, S with WebSockets]
- Definition Classes
- SttpApi
-
def
asWebSocketUnsafe[F[_]]: ResponseAs[Either[String, WebSocket[F]], Effect[F] with WebSockets]
- Definition Classes
- SttpApi
-
def
asWebSocketWithMetadata[F[_], T](f: (WebSocket[F], ResponseMetadata) ⇒ F[T]): ResponseAs[Either[String, T], Effect[F] with WebSockets]
- Definition Classes
- SttpApi
- lazy val backend: SttpBackend[Future, Any]
-
val
basicRequest: RequestT[Empty, Either[String, String], Any]
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.- Definition Classes
- SttpApi
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
-
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]
, whereLeft
is used if the status code is non-2xx, andRight
otherwise.- Definition Classes
- SttpApi
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fromMetadata[T, R](default: ResponseAs[T, R], conditions: ConditionalResponseAs[T, R]*): ResponseAs[T, R]
- Definition Classes
- SttpApi
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
def
ignore: ResponseAs[Unit, Any]
- Definition Classes
- SttpApi
-
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.Content type will be set to
application/octet-stream
, can be overridden later using thecontentType
method.- Definition Classes
- SttpApi
-
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.- Definition Classes
- SttpApi
-
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.- Definition Classes
- SttpApi
-
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.- Definition Classes
- SttpApi
-
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.- Definition Classes
- SttpApi
-
def
multipart(name: String, data: InputStream): 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.- Definition Classes
- SttpApi
-
def
multipart(name: String, data: ByteBuffer): 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.- Definition Classes
- SttpApi
-
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.Content type will be set to
application/octet-stream
, can be overridden later using thecontentType
method.- Definition Classes
- SttpApi
-
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 thecontentType
method.Content type will be set to
text/plain
with given encoding, can be overridden later using thecontentType
method.- Definition Classes
- SttpApi
-
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.Content type will be set to
text/plain
withutf-8
encoding, can be overridden later using thecontentType
method.- Definition Classes
- SttpApi
-
def
multipartFile(name: String, file: 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
-
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 thecontentType
method.Content type will be set to
application/octet-stream
, can be overridden later using thecontentType
method.- Definition Classes
- SttpApi
-
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, Any]
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
-
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( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated