io.laminext.fetch

Type members

Classlikes

object Fetch
final case class FetchError(cause: Any) extends FetchException
final class FetchEventStreamBuilder(var _url: ToRequestUrl, var _method: HttpMethod, var _headers: UndefOr[Map[String, String]], var _body: ToRequestBody, var _referrer: UndefOr[String], var _referrerPolicy: UndefOr[ReferrerPolicy], var _mode: UndefOr[RequestMode], var _credentials: UndefOr[RequestCredentials], var _cache: UndefOr[RequestCache], var _redirect: UndefOr[RequestRedirect], var _integrity: UndefOr[String], var _keepalive: UndefOr[Boolean], var _timeout: UndefOr[FiniteDuration])
sealed abstract class FetchException extends Throwable
final case class FetchResponse[A](ok: Boolean, status: Int, statusText: ByteString, headers: Headers, `type`: ResponseType, data: A, url: String)
Type Params
A

type of the extracted data (String, js.Any for json, dom.Blob, etc)

Value Params
`type`

Contains the type of the response.

data

Contains the extracted response data (string, json, blob, etc)

headers

Contains the Headers object associated with the response.

ok

Contains a boolean stating whether the response was successful (status in the range 200-299) or not.

status

Contains the status code of the response (e.g., 200 for a success).

statusText

Contains the status message corresponding to the status code (e.g., OK for 200).

url

Contains the URL of the response.

final case class FetchTimeout(timeout: FiniteDuration) extends FetchException
trait ReExports
case class RequestUrl(protocol: String, hostname: String, path: Seq[String], params: Map[String, Seq[String]]) extends ToRequestUrl
Companion
object
Companion
class
Companion
object
object ToRequestUrl
Companion
class

Value members

Inherited methods

def uri(origin: String, path: String, params: Map[String, Seq[String]]): RequestUrl
Inherited from
FetchSyntax

Implicits

Inherited implicits

implicit def syntaxEventStreamOfFetchResponse[A](underlying: EventStream[FetchResponse[A]]): EventStreamOfFetchResponseOps[A]
Inherited from
FetchSyntax
implicit def syntaxEventStreamOfFetchResponseOfEither[L, R](underlying: EventStream[FetchResponse[Either[L, R]]]): EventStreamOfFetchResponseOfEitherOps[L, R]
Inherited from
FetchSyntax