PercentEncoder

zio.http.PercentEncoder

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
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

object ComponentType

Attributes

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

Attributes

Companion
object
Source
PercentEncoder.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Fragment
object PathSegment
object QueryKey
object QueryValue
object UserInfo

Value members

Concrete methods

def decode(s: String): String

Attributes

Source
PercentEncoder.scala
def encode(s: String, componentType: ComponentType): String

Attributes

Source
PercentEncoder.scala