URL

zio.http.URL
See theURL companion object
final case class URL(path: Path, kind: Location, queryParams: QueryParams, fragment: Option[Fragment]) extends URLPlatformSpecific

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait QueryChecks[URL]
trait QueryGetters[URL]
class Object
trait Matchable
class Any
Show all
Self type
URL

Members list

Value members

Concrete methods

def ++(that: URL): URL

A right-biased way of combining two URLs. Where it makes sense, information will be merged, but in cases where this does not make sense (e.g. two non-empty fragments), the information from the right URL will be used.

A right-biased way of combining two URLs. Where it makes sense, information will be merged, but in cases where this does not make sense (e.g. two non-empty fragments), the information from the right URL will be used.

Attributes

def /(segment: String): URL
def absolute(host: String): URL
def absolute(scheme: Scheme, host: String, port: Int): URL
def addPath(path: Path): URL
def addPath(path: String): URL
def addQueryParams(queryParams: QueryParams): URL
def encode: String
override def equals(that: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Value parameters

that

the object to compare against this object for equality.

Attributes

Returns

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
Equals -> Any
override def hashCode(): Int

Calculate a hash code value for the object.

Calculate a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Attributes

Returns

the hash code value for this object.

Definition Classes
Any
def host: Option[String]
def host(host: String): URL
def hostPort: Option[String]

Attributes

Returns

the location, the host name and the port. The port part is omitted if is the default port for the protocol.

def isAbsolute: Boolean
def isRelative: Boolean
def normalize: URL
def path(path: Path): URL
def path(path: String): URL
def port(port: Int): URL
def port: Option[Int]
def portIfNotDefault: Option[Int]
def portOrDefault: Option[Int]

Attributes

Definition Classes
def relative: URL
def resolve(reference: URL): Either[String, URL]

RFC 3986 § 5.2 Relative Resolution

RFC 3986 § 5.2 Relative Resolution

Value parameters

reference

the URL to resolve relative to this base URL

Attributes

Returns

the target URL

def scheme: Option[Scheme]
def scheme(scheme: Scheme): URL
def toJavaURI: URI

Returns a new java.net.URI representing this URL.

Returns a new java.net.URI representing this URL.

Attributes

Attributes

Definition Classes

Inherited methods

def ++(that: QueryParams): A

Combines two collections of query parameters together. If there are duplicate keys, the values from both sides are preserved, in order from left-to-right.

Combines two collections of query parameters together. If there are duplicate keys, the values from both sides are preserved, in order from left-to-right.

Attributes

Inherited from:
QueryModifier
def addQueryParam(key: String, value: String): A

Adds the specified key/value pair to the query parameters.

Adds the specified key/value pair to the query parameters.

Attributes

Inherited from:
QueryModifier
def addQueryParams(values: String): A

Attributes

Inherited from:
QueryModifier
def addQueryParams(key: String, value: Chunk[String]): A

Adds the specified key/value pairs to the query parameters.

Adds the specified key/value pairs to the query parameters.

Attributes

Inherited from:
QueryModifier
def hasQueryParam(name: CharSequence): Boolean

Attributes

Inherited from:
QueryChecks
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def queryParam(key: String): Option[String]

Retrieves the first query parameter value having the specified name.

Retrieves the first query parameter value having the specified name.

Attributes

Inherited from:
QueryGetters
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

Inherited from:
QueryGetters
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

Inherited from:
QueryGetters
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

Inherited from:
QueryGetters
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

Inherited from:
QueryGetters
def queryParams(key: String): Chunk[String]

Retrieves all query parameter values having the specified name.

Retrieves all query parameter values having the specified name.

Attributes

Inherited from:
QueryGetters
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

Inherited from:
QueryGetters
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

Inherited from:
QueryGetters
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

Inherited from:
QueryGetters
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

Inherited from:
QueryGetters
def removeQueryParam(key: String): A

Removes the specified key from the query parameters.

Removes the specified key from the query parameters.

Attributes

Inherited from:
QueryModifier
def removeQueryParams(keys: Iterable[String]): A

Removes the specified keys from the query parameters.

Removes the specified keys from the query parameters.

Attributes

Inherited from:
QueryModifier
def setQueryParams(queryParams: (String, Chunk[String])*): A

Attributes

Inherited from:
QueryModifier
def setQueryParams(queryParams: Map[String, Chunk[String]]): A

Attributes

Inherited from:
QueryModifier
def setQueryParams(values: String): A

Attributes

Inherited from:
QueryModifier
def setQueryParams(values: QueryParams): A

Attributes

Inherited from:
QueryModifier