Backend

zio.http.Flash.Backend
See theBackend companion object
trait Backend

Flash.Backend represents a flash-scope that is not cookie-based but instead uses an internal structure.

Semantically it is identical to the cookie-based flash-scope (valid for a single request) but by using Flash.Backend we're not limited in size of the payload as in the cookie-based flash-scope. Still, the Flash.Backend uses a cookie but does not transport the payload with it but only an internal identifier.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Abstract methods

def addFlash[A](response: Response, setter: Setter[A]): UIO[Response]

Adds flash values to the backend-based flash-scope and returns a workflow with an updated Response.

Adds flash values to the backend-based flash-scope and returns a workflow with an updated Response.

Attributes

def flash[A](request: Request, flash: Flash[A]): IO[Throwable, A]

Gets an A from the backend-based flash-scope or fails with a Throwable.

Gets an A from the backend-based flash-scope or fails with a Throwable.

Attributes

Concrete methods

final def addFlash[A](response: Response, setterOpt: Option[Setter[A]]): UIO[Response]

Optionally adds flash values to the backend-based flash-scope and returns a workflow with an updated Response.

Optionally adds flash values to the backend-based flash-scope and returns a workflow with an updated Response.

Attributes

final def flashOrElse[A](request: Request, flash: Flash[A])(orElse: => A): UIO[A]

Gets an A from the backend-based flash-scope and provides a fallback.

Gets an A from the backend-based flash-scope and provides a fallback.

Attributes