Skip to content
Scala implementation of URI Template (RFC 6570)
Scala Shell
Branch: master
Clone or download
Latest commit e7ec7d0 Oct 15, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci version 2.1 circleci Apr 24, 2019
bench/src/main/scala/uritemplate4s/bench
bin publish all jvm and js Sep 22, 2019
core Should be using blackbox macros Sep 9, 2019
docs/src/main Update Docs For 2.13 (#110) Sep 11, 2019
project
.gitignore Publish tags (#45) Nov 18, 2018
.mergify.yml Attempt to fix malformed .mergify.yml Apr 5, 2019
.sbtopts add sbtopts May 11, 2018
.scalafix.conf Update to scalafix 0.9.0 (#37) Nov 11, 2018
LICENSE
README.md
build.sbt Update circe-core, circe-generic, ... to 0.12.2 Oct 8, 2019
pubring.asc Publish tags (#45) Nov 18, 2018
secring.asc.enc Publish tags (#45) Nov 18, 2018

README.md

uritemplate4s

CircleCI Join the chat at https://gitter.im/slakah/uritemplate4s Latest version

Scala implementation of URI Template (RFC 6570).

Getting Started

uritemplate4s is currently available for Scala 2.13, 2.12 and Scala.js.

Add the following to your build.sbt:

libraryDependencies += "com.gubbns" %% "uritemplate4s" % "0.5.2"

Usage

import uritemplate4s._

val template = uritemplate"https://{host}/search{?q}{&params*}"
template.expand(
    "host" -> "search-engine.com",
    "q" -> "Esio Trot",
    "params" -> Map("lang" -> "en", "type" -> "book")
  ).value
// res0: String = https://search-engine.com/search?q=Esio%20Trot&lang=en&type=book

Further documentation is available here.

You can’t perform that action at this time.