Uri

io.lemonlabs.uri.Uri
See theUri companion object
sealed trait Uri extends Product with Serializable

Represents a URI. See RFC 3986

Can either be a URL or a URN

URLs will be one of these forms:

  •       Absolute: `http://example.com`
    
  • Protocol Relative: //example.com
  • Without Authority: mailto:[email protected]
  •  Root Relative: `/index.html?a=b`
    
  • Rootless Relative: index.html?a=b
  • Rootless Relative (with doc segment): ../index.html?a=b

URNs will be in the form urn:example:example2

Attributes

Companion:
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Type members

Types

type Self <: Uri

Value members

Abstract methods

def equalsUnordered(other: Uri): Boolean

Similar to == but ignores the ordering of any query string parameters

Similar to == but ignores the ordering of any query string parameters

Attributes

def path: Path
def schemeOption: Option[String]
def toUrl: Url
def toUrn: Urn
def withConfig(config: UriConfig): Self

Copies this Uri but with a new UriConfig

Copies this Uri but with a new UriConfig

Attributes

config

the new config to use

Returns:

a new Uri with the specified config

def withScheme(scheme: String): SelfWithScheme

Copies this Uri but with the scheme set as the given value.

Copies this Uri but with the scheme set as the given value.

Attributes

scheme

the new scheme to set

Returns:

a new Uri with the specified scheme

Concrete methods

def toJavaURI: URI

Converts to a java.net.URI

Converts to a java.net.URI

This involves a toString and URI.parse because the specific java.net.URI constructors do not deal properly with encoded elements

Attributes

Returns:

a java.net.URI matching this io.lemonlabs.uri.Uri

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
def toStringRaw: String

Returns the path with no encoders taking place (e.g. non ASCII characters will not be percent encoded)

Returns the path with no encoders taking place (e.g. non ASCII characters will not be percent encoded)

Attributes

Returns:

String containing the raw path for this Uri

Inherited methods

def canEqual(that: Any): Boolean

Attributes

Inherited from:
Equals
def productArity: Int

Attributes

Inherited from:
Product
def productElement(n: Int): Any

Attributes

Inherited from:
Product
def productElementName(n: Int): String

Attributes

Inherited from:
Product
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def productPrefix: String

Attributes

Inherited from:
Product

Implicits

Implicits

implicit def config: UriConfig