io.laminext.fetch.FetchSyntax.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fetch_sjs1_3 Show documentation
Show all versions of fetch_sjs1_3 Show documentation
Laminar utilities and components
package io.laminext.fetch
import com.raquo.laminar.api.L._
import io.laminext.fetch.ops.EventStreamOfFetchResponseOfEitherOps
import io.laminext.fetch.ops.EventStreamOfFetchResponseOps
import io.laminext.fetch.ops.FetchEventStreamBuilderOps
import io.laminext.util.UrlString
trait FetchSyntax {
def url(
absolute: String,
params: Map[String, Seq[String]] = Map.empty
): RequestUrl =
RequestUrl.fromLocation(UrlString.parse(absolute)).addParams(params)
implicit def syntaxFetchEventStreamBuilder(
underlying: FetchEventStreamBuilder
): FetchEventStreamBuilderOps = new FetchEventStreamBuilderOps(underlying)
implicit def syntaxEventStreamOfFetchResponseOfEither[L, R](
underlying: EventStream[FetchResponse[Either[L, R]]]
): EventStreamOfFetchResponseOfEitherOps[L, R] = new EventStreamOfFetchResponseOfEitherOps[L, R](underlying)
implicit def syntaxEventStreamOfFetchResponse[A](
underlying: EventStream[FetchResponse[A]]
): EventStreamOfFetchResponseOps[A] = new EventStreamOfFetchResponseOps[A](underlying)
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy