URL

zio.http.URL
See theURL companion object
final case class URL(scheme: Option[Scheme], host: Option[String], port: Option[Int], path: Path, queryParams: QueryParams, fragment: Option[String])

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
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def /(segment: String): URL

Attributes

Source
URL.scala
def ??(key: String, value: String): URL

Attributes

Source
URL.scala

Attributes

Source
URL.scala
def addPath(segment: String): URL

Attributes

Source
URL.scala
def addPath(p: Path): URL

Attributes

Source
URL.scala

Attributes

Source
URL.scala

Attributes

Source
URL.scala

Attributes

Source
URL.scala

Attributes

Source
URL.scala
def encode: String

Attributes

Source
URL.scala
def fragment(f: String): URL

Attributes

Source
URL.scala
def host(h: String): URL

Attributes

Source
URL.scala
def hostPort: Option[String]

Attributes

Source
URL.scala
def isAbsolute: Boolean

Attributes

Source
URL.scala
def isRelative: Boolean

Attributes

Source
URL.scala
def path(p: Path): URL

Attributes

Source
URL.scala
def port(p: Int): URL

Attributes

Source
URL.scala
def relative: URL

Attributes

Source
URL.scala
def scheme(s: Scheme): URL

Attributes

Source
URL.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
URL.scala

Attributes

Source
URL.scala

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
Source
Product.scala
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product
Source
Product.scala