QueryGetters

zio.http.internal.QueryGetters
See theQueryGetters companion object
trait QueryGetters[+A]

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
QueryOps[A]

Members list

Value members

Abstract methods

Concrete methods

def query[T](key: String)(implicit schema: Schema[T]): Either[QueryParamError, T]

Retrieves the query parameter with the specified name as a value of the specified type. The type must have a schema and can be a primitive type (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these.

Retrieves the query parameter with the specified name as a value of the specified type. The type must have a schema and can be a primitive type (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these.

Attributes

def query[T](implicit schema: Schema[T]): Either[QueryParamError, T]

Retrieves query parameters as a value of the specified type. The type must have a schema and be a case class and all fields must be query parameters. So fields must be of primitive types (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these. Query parameters are selected by field names.

Retrieves query parameters as a value of the specified type. The type must have a schema and be a case class and all fields must be query parameters. So fields must be of primitive types (e.g. Int, String, UUID, Instant etc.), a case class with a single field or a collection of either of these. Query parameters are selected by field names.

Attributes

def queryOrElse[T](key: String, default: => T)(implicit schema: Schema[T]): T
def queryOrElse[T](default: => T)(implicit schema: Schema[T]): T

Retrieves the first query parameter value having the specified name.

Retrieves the first query parameter value having the specified name.

Attributes

def queryParamOrElse(key: String, default: => String): String

Retrieves the first query parameter value having the specified name, or else uses the default value.

Retrieves the first query parameter value having the specified name, or else uses the default value.

Attributes

Retrieves all query parameter values having the specified name.

Retrieves all query parameter values having the specified name.

Attributes

def queryParamsOrElse(key: String, default: => Iterable[String]): Chunk[String]

Retrieves all query parameter values having the specified name, or else uses the default iterable.

Retrieves all query parameter values having the specified name, or else uses the default iterable.

Attributes

def queryZIO[T](key: String)(implicit schema: Schema[T]): IO[QueryParamError, T]

Retrieves all typed query parameter values having the specified name as ZIO

Retrieves all typed query parameter values having the specified name as ZIO

Attributes

Deprecated methods

def queryParamTo[T](key: String)(implicit codec: TextCodec[T]): Either[QueryParamsError, T]

Retrieves the first typed query parameter value having the specified name.

Retrieves the first typed query parameter value having the specified name.

Attributes

Deprecated
[Since version 3.1.0] Use query(key)[T]
def queryParamToOrElse[T](key: String, default: => T)(implicit codec: TextCodec[T]): T

Retrieves the first typed query parameter value having the specified name, or else uses the default value.

Retrieves the first typed query parameter value having the specified name, or else uses the default value.

Attributes

Deprecated
[Since version 3.1.0] Use queryParamOrElse(key, default)
def queryParamToZIO[T](key: String)(implicit codec: TextCodec[T]): IO[QueryParamsError, T]

Retrieves the first typed query parameter value having the specified name as ZIO.

Retrieves the first typed query parameter value having the specified name as ZIO.

Attributes

Deprecated
[Since version 3.1.0] Use queryZIO(key)[T]
def queryParamsTo[T](key: String)(implicit codec: TextCodec[T]): Either[QueryParamsError, Chunk[T]]

Retrieves all typed query parameter values having the specified name.

Retrieves all typed query parameter values having the specified name.

Attributes

Deprecated
[Since version 3.1.0] Use query(key)[Chunk[T]
def queryParamsToOrElse[T](key: String, default: => Iterable[T])(implicit codec: TextCodec[T]): Chunk[T]

Retrieves all query parameter values having the specified name, or else uses the default iterable.

Retrieves all query parameter values having the specified name, or else uses the default iterable.

Attributes

Deprecated
[Since version 3.1.0] Use queryParamsOrElse(key, default)
def queryParamsToZIO[T](key: String)(implicit codec: TextCodec[T]): IO[QueryParamsError, Chunk[T]]

Retrieves all typed query parameter values having the specified name as ZIO.

Retrieves all typed query parameter values having the specified name as ZIO.

Attributes

Deprecated
[Since version 3.1.0] Use queryZIO(key)[Chunk[T]