zio.http

package zio.http

Members list

Packages

package zio.http.htmx
package zio.http.schema

Type members

Classlikes

object Body

Attributes

Companion
class
Source
Body.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Body.type
final class Body

HTTP message body backed by a Stream[Nothing, Byte].

HTTP message body backed by a Stream[Nothing, Byte].

Body is a thin wrapper around a pull-based byte stream and a content type. All optimization intelligence (known chunk, known length) lives in the underlying Stream via its knownChunk and knownLength metadata APIs.

Value parameters

contentType

the MIME content type of this body

stream

the underlying byte stream

Attributes

Companion
object
Source
Body.scala
Supertypes
class Object
trait Matchable
class Any
object Boundary

Attributes

Companion
class
Source
Boundary.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Boundary.type
final case class Boundary(value: String)

Attributes

Companion
object
Source
Boundary.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

Attributes

Source
BuildInfo.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
BuildInfo.type
object Charset

Attributes

Companion
class
Source
Charset.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Charset.type
sealed abstract class Charset(val name: String)

Attributes

Companion
object
Source
Charset.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ASCII
object ISO_8859_1
object UTF16
object UTF16BE
object UTF16LE
object UTF8
Show all
final case class ContentType(mediaType: MediaType, boundary: Option[Boundary] = ..., charset: Option[Charset] = ...)

Attributes

Companion
object
Source
ContentType.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ContentType

Attributes

Companion
class
Source
ContentType.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
object Cookie

Attributes

Source
Cookie.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Cookie.type

Attributes

Companion
trait
Source
Cookie.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait CookiePriority

Represents the Priority attribute of a Set-Cookie header.

Represents the Priority attribute of a Set-Cookie header.

Supported values are Low, Medium, and High, which render directly as the corresponding Priority attribute values.

Attributes

Companion
object
Source
Cookie.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object High
object Low
object Medium
final case class Form(entries: Chunk[(String, String)])

Attributes

Companion
object
Source
Form.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Form

Attributes

Companion
class
Source
Form.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Form.type
object FormField

Attributes

Companion
trait
Source
FormField.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
FormField.type
sealed trait FormField

Attributes

Companion
object
Source
FormField.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Binary
class Simple
class Text
object Header

Attributes

Companion
trait
Source
Header.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Header.type
trait Header

Attributes

Companion
object
Source
Header.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class HxBoosted
class HxCurrentUrl
class HxLocation
class HxPrompt
class HxPushUrl
class HxRedirect
class HxRefresh
class HxReplaceUrl
class HxRequest
class HxReselect
class HxReswap
class HxRetarget
class HxTargetId
class HxTriggerId
class Accept
class Any
class Br
class Compress
class Deflate
class GZip
class Identity
class Multiple
class AcceptPatch
trait AcceptRanges
object Bytes
object None_
object All
class Specific
class Age
class Allow
class Basic
class Bearer
class Digest
class Unparsed
trait CacheControl
object Immutable
class MaxAge
class MaxStale
class MinFresh
class Multiple
object NoCache
object NoStore
object NoTransform
object OnlyIfCached
object Private
object Public
class SMaxAge
class StaleIfError
trait Connection
object Close
object KeepAlive
class Other
class ContentBase
class Attachment
class FormData
class Inline
object Br
object Compress
object Deflate
object GZip
object Identity
class Multiple
class ContentMd5
class ContentRange
object Base64
object Binary
object EightBit
object SevenBit
class ContentType
class CookieHeader
class Custom
trait DNT
object Unset
class Date
class ETag
class Expect
class Expires
class Forwarded
class From
class Host
trait IfMatch
object Any
class ETags
trait IfNoneMatch
object Any
class ETags
class IfRange
class LastModified
class Link
class Location
class MaxForwards
trait Origin
object Null_
class Value
class Pragma
class Basic
class Bearer
class Digest
class Unparsed
class Range
class Referer
class RetryAfter
class Server
class Te
class Trailer
object Chunked
object Compress
object Deflate
object GZip
object Identity
class Multiple
class Upgrade
class UserAgent
trait Vary
object Any
class Headers
class Via
object Deny
object SameOrigin
Show all
object Headers

Attributes

Companion
class
Source
Headers.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Headers.type
final class Headers

Immutable collection of HTTP headers, backed by parallel arrays.

Immutable collection of HTTP headers, backed by parallel arrays.

Header names are stored pre-lowercased for case-insensitive matching. Multiple headers with the same name are allowed (multi-value). The parsed array is populated lazily on typed get calls. The cache is an optimization only: duplicate benign parses are possible if the same Headers is read concurrently.

Attributes

Companion
object
Source
Headers.scala
Supertypes
class Object
trait Matchable
class Any
final class HeadersBuilder

Attributes

Companion
object
Source
Headers.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Source
Headers.scala
Supertypes
class Object
trait Matchable
class Any
Self type
sealed abstract class Method(val name: String, val ordinal: Int)

HTTP request method as defined by RFC 9110.

HTTP request method as defined by RFC 9110.

Each method has a unique ordinal for efficient array-based dispatch.

Attributes

Companion
object
Source
Method.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object ANY
object CONNECT
object DELETE
object GET
object HEAD
class Methods
object OPTIONS
object PATCH
object POST
object PUT
object TRACE
Show all
object Method

Attributes

Companion
class
Source
Method.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Method.type
final case class Path(segments: Chunk[String], hasLeadingSlash: Boolean, trailingSlash: Boolean)

Decoded URL path, stored as individual decoded segments.

Decoded URL path, stored as individual decoded segments.

Segments are stored without percent-encoding; use encode to produce a percent-encoded path string and render for the decoded form. Parse already-encoded paths with Path.fromEncoded.

Attributes

Companion
object
Source
Path.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Path

Attributes

Companion
class
Source
Path.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Path.type

RFC 3986 percent-encoding utilities.

RFC 3986 percent-encoding utilities.

Provides component-specific encoding via ComponentType variants (PathSegment, QueryKey, QueryValue, Fragment, UserInfo), each allowing a different set of unescaped characters as defined by the RFC. Non-ASCII characters are first encoded to UTF-8 bytes, then each byte is percent-encoded.

decode converts percent-encoded triplets back to characters; invalid or incomplete percent sequences are passed through unchanged.

Note: this encoder does '''not''' use application/x-www-form-urlencoded rules (spaces are encoded as %20, never as +).

Attributes

Source
PercentEncoder.scala
Supertypes
class Object
trait Matchable
class Any
Self type
object QueryParams

Attributes

Companion
class
Source
QueryParams.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final class QueryParams

Immutable multi-map of query parameters, backed by parallel arrays.

Immutable multi-map of query parameters, backed by parallel arrays.

Keys may appear at most once; each key maps to one or more values stored as a Chunk[String]. Values are stored decoded; use encode to produce a percent-encoded query string and QueryParams.fromEncoded to parse one.

Attributes

Companion
object
Source
QueryParams.scala
Supertypes
class Object
trait Matchable
class Any
final class QueryParamsBuilder

Attributes

Companion
object
Source
QueryParams.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Source
QueryParams.scala
Supertypes
class Object
trait Matchable
class Any
Self type
object Request

Attributes

Companion
class
Source
Request.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Request.type
final case class Request(method: Method, url: URL, headers: Headers, body: Body, version: Version)

Immutable HTTP request consisting of method, URL, headers, body, and protocol version.

Immutable HTTP request consisting of method, URL, headers, body, and protocol version.

Convenience accessors path and queryParams delegate to the url field.

Attributes

Companion
object
Source
Request.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class RequestCookie(name: String, value: String)

Attributes

Source
Cookie.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class Response(status: Status, headers: Headers = ..., body: Body = ..., version: Version = ...)

Immutable HTTP response consisting of status, headers, body, and protocol version.

Immutable HTTP response consisting of status, headers, body, and protocol version.

Attributes

Companion
object
Source
Response.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Response

Attributes

Companion
class
Source
Response.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
Response.type
final case class ResponseCookie(name: String, value: String, expires: Option[String] = ..., domain: Option[String] = ..., path: Option[Path] = ..., maxAge: Option[Long] = ..., isSecure: Boolean = ..., isHttpOnly: Boolean = ..., sameSite: Option[SameSite] = ..., isPartitioned: Boolean = ..., priority: Option[CookiePriority] = ...)

Cookie emitted in a Set-Cookie response header.

Cookie emitted in a Set-Cookie response header.

The expires field is rendered verbatim as the Expires attribute and is expected to already be in the HTTP-date format used by RFC 6265, such as Wed, 21 Oct 2026 07:28:00 GMT. The priority field maps to the non-RFC but commonly used Priority attribute, and isPartitioned maps to the Partitioned attribute. Rendering validates the cookie name and unquoted cookie value and rejects SameSite=None unless Secure is also set.

Attributes

Source
Cookie.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object SameSite

Attributes

Companion
trait
Source
Cookie.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
SameSite.type
sealed trait SameSite

Attributes

Companion
object
Source
Cookie.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Lax
object None_
object Strict
sealed trait Scheme

Attributes

Companion
object
Source
Scheme.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Custom
object HTTP
object HTTPS
object WS
object WSS
object Scheme

Attributes

Companion
trait
Source
Scheme.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Scheme.type

Attributes

Companion
class
Source
ServerSentEvent.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final class ServerSentEvent[+A]

A Server-Sent Event (SSE) envelope carrying typed data.

A Server-Sent Event (SSE) envelope carrying typed data.

The payload A is rendered into one or more data: lines via an SseDataEncoder. The remaining fields (event, id, retry) are SSE metadata owned by the envelope itself.

Attributes

Companion
object
Source
ServerSentEvent.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Source
ServerSentEvent.scala
Supertypes
class Object
trait Matchable
class Any
Self type
trait SseDataEncoder[-A]

Encodes typed SSE payloads into one or more data: lines.

Encodes typed SSE payloads into one or more data: lines.

Attributes

Companion
object
Source
ServerSentEvent.scala
Supertypes
class Object
trait Matchable
class Any
object Status

Attributes

Source
Status.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Status.type
object URL

Attributes

Companion
class
Source
URL.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
URL.type
final case class URL(scheme: Option[Scheme], host: Option[String], port: Option[Int], path: Path, queryParams: QueryParams, fragment: Option[String])

Pure, immutable URL representation.

Pure, immutable URL representation.

Path segments are stored in decoded form and percent-encoded on output via encode. parse returns Left on invalid input (empty string, malformed port, etc.). Use / to append a path segment and ?? to add a query parameter. encode renders the full URL string with proper percent-encoding.

Attributes

Companion
object
Source
URL.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed abstract class Version(val major: Int, val minor: Int)

Attributes

Companion
object
Source
Version.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object HTTP/1.0
object HTTP/1.1
object HTTP/2.0
object HTTP/3.0
object Version

Attributes

Companion
class
Source
Version.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Version.type

Types

opaque type Status

Attributes

Source
Status.scala