
urldsl.url.UrlStringParser.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of url-dsl_3 Show documentation
Show all versions of url-dsl_3 Show documentation
A tiny library for parsing and creating urls in a type-safe way
The newest version!
package urldsl.url
import urldsl.vocabulary.{MaybeFragment, Param, Segment}
trait UrlStringParser extends UrlStringDecoder {
val rawUrl: String
/** Returns the raw content of the query string. */
def queryParametersString: String
/** Returns the raw content of the path. */
def path: String
/** Returns the raw content of the fragment (sometimes called ref), or None if there is no fragment */
def maybeFragment: Option[String]
/** Alias for [[maybeFragment]]. */
final def maybeRef: Option[String] = maybeFragment
final def segments: List[Segment] = decodePath(path)
final def params: Map[String, Param] = decodeParams(queryParametersString)
final def maybeFragmentObj: MaybeFragment = MaybeFragment(maybeFragment.map(decode(_)))
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy