Uri

org.http4s.Uri
See theUri companion object

Representation of the Request URI

Value parameters

authority

optional Uri Authority. eg, localhost:8080, www.foo.bar

fragment

optional Uri Fragment. url-encoded.

path

url-encoded string representation of the path component of the Uri.

query

optional Query. url-encoded.

scheme

optional Uri Scheme. eg, http, https

Attributes

Companion
object
Source
Uri.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Renderable
trait QueryOps
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

This is an alias to addSegment

This is an alias to addSegment

Attributes

Source
Uri.scala

This is an alias to addSegment]

This is an alias to addSegment]

Attributes

Source
Uri.scala

Splits the path segments and adds each of them to the path url-encoded.

Splits the path segments and adds each of them to the path url-encoded. A segment is delimited by /

Value parameters

morePath

the path to add

Attributes

Returns

a new uri with the segments added to the path

Source
Uri.scala

Urlencodes and adds a path segment to the Uri

Urlencodes and adds a path segment to the Uri

Value parameters

newSegment

the segment to add.

Attributes

Returns

a new uri with the segment added to the path

Source
Uri.scala

Urlencodes and adds a path segment to the Uri

Urlencodes and adds a path segment to the Uri

Type parameters

Type

to be encoded to a Uri Segment

Value parameters

newSegment

the segment to add.

Attributes

Returns

a new uri with the segment added to the path

Source
Uri.scala
def host: Option[Host]

Attributes

Source
Uri.scala

Representation of the query string as a map

Representation of the query string as a map

In case a parameter is available in query string but no value is there the list will be empty. If the value is empty the the list contains an empty string.

Examples

Query String Map
?param=v Map("param" -> List("v"))
?param= Map("param" -> List(""))
?param Map("param" -> List())
?=value Map("" -> List("value"))
?p1=v1&p1=v2&p2=v3&p2=v3 Map("p1" -> List("v1","v2"), "p2" -> List("v3","v4"))

The query string is lazily parsed. If an error occurs during parsing an empty Map is returned.

Attributes

Source
Uri.scala

View of the head elements of the URI parameters in query string.

View of the head elements of the URI parameters in query string.

In case a parameter has no value the map returns an empty string.

Attributes

See also

multiParams

Source
Uri.scala
def port: Option[Int]

Attributes

Source
Uri.scala
override def render(writer: Writer): writer.type

Base method for rendering this object efficiently

Base method for rendering this object efficiently

Attributes

Definition Classes
Source
Uri.scala

Attributes

Source
Uri.scala

Converts this request to origin-form, which is the absolute path and optional query.

Converts this request to origin-form, which is the absolute path and optional query. If the path is relative, it is assumed to be relative to the root.

Attributes

Source
Uri.scala

Attributes

Source
Uri.scala

Attributes

Source
Uri.scala

Attributes

Source
Uri.scala

Attributes

Source
Uri.scala

Deprecated methods

Adds the path exactly as described.

Adds the path exactly as described. Any path element must be urlencoded ahead of time.

Value parameters

path

the path string to replace

Attributes

Deprecated
true
Source
Uri.scala

Inherited methods

alias for withQueryParam

alias for withQueryParam

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

alias for withQueryParam

alias for withQueryParam

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

alias for withQueryParam

alias for withQueryParam

scala> import org.http4s.implicits._
scala> uri"www.scala.com".++?("key" -> List("value1", "value2", "value3"))
res1: Uri = www.scala.com?key=value1&key=value2&key=value3

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

alias for withQueryParam

alias for withQueryParam

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

alias for withQueryParam

alias for withQueryParam

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala
def +?[T : QueryParam]: Self

alias for withQueryParam

alias for withQueryParam

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

alias for withOptionQueryParam

alias for withOptionQueryParam

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

alias for withOptionQueryParam

alias for withOptionQueryParam

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala
def -?[K : QueryParamKeyLike](key: K): Self

alias for removeQueryParam

alias for removeQueryParam

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala
def -?[T](implicit key: QueryParam[T]): Self

alias for removeQueryParam

alias for removeQueryParam

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

alias for setQueryParams

alias for setQueryParams

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

alias for containsQueryParam

alias for containsQueryParam

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala
def containsQueryParam[T](implicit key: QueryParam[T]): Boolean

Checks if a specified parameter exists in the Query.

Checks if a specified parameter exists in the Query. A parameter without a name can be checked with an empty string.

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Creates maybe a new Self without the specified parameter in query.

Creates maybe a new Self without the specified parameter in query. If no parameter with the given key exists then this will be returned.

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

Creates maybe a new Self with the specified parameters.

Creates maybe a new Self with the specified parameters. If any of the given parameters' keys already exists, the value(s) will be replaced.

Attributes

Inherited from:
QueryOps
Source
QueryOps.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
Renderable -> Any
Inherited from:
Renderable
Source
Renderable.scala

Creates maybe a new Self with all the specified parameters in the Query.

Creates maybe a new Self with all the specified parameters in the Query. If any of the given parameters' keys already exists, the value(s) will be replaced. Parameters from the input map are added left-to-right, so if a parameter with a given key is specified more than once, it will be self-overwriting.

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

Creates maybe a new Self with the specified parameter in the Query.

Creates maybe a new Self with the specified parameter in the Query. If the value is empty or if the parameter to be added equal the existing entry the same instance of Self will be returned. If a parameter with the given name already exists the values will be replaced.

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

Creates maybe a new Self with the specified parameter in the Query.

Creates maybe a new Self with the specified parameter in the Query. If the value is empty or if the parameter to be added equal the existing entry the same instance of Self will be returned. If a parameter with the given key already exists the values will be replaced.

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

Creates maybe a new Self with the specified parameters in the Query.

Creates maybe a new Self with the specified parameters in the Query. If a parameter with the given key already exists the values will be replaced.

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

Creates maybe a new Self with the specified parameter in the Query.

Creates maybe a new Self with the specified parameter in the Query. If a parameter with the given key already exists the values will be replaced. If the parameter to be added equal the existing entry the same instance of Self will be returned.

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

Creates a new Self with the specified parameter in the Query.

Creates a new Self with the specified parameter in the Query. If a parameter with the given key already exists the values will be replaced with an empty list.

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

Creates a new Self with the specified parameter in the Query.

Creates a new Self with the specified parameter in the Query. If a parameter with the given QueryParam.key already exists the values will be replaced with an empty list.

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

Creates maybe a new Self with all the specified parameters in the Query.

Creates maybe a new Self with all the specified parameters in the Query. If any of the given parameters' keys already exists, the value(s) will be replaced. Parameters from the input map are added left-to-right, so if a parameter with a given key is specified more than once, it will be self-overwriting.

Attributes

Inherited from:
QueryOps
Source
QueryOps.scala

Concrete fields

lazy override val renderString: String

Generates a String rendering of this object

Generates a String rendering of this object

Attributes

Source
Uri.scala