-
Notifications
You must be signed in to change notification settings - Fork 0
RestPath
Norman Basham edited this page Feb 17, 2020
·
1 revision
Create REST URL paths with let path = RestPath("pets", 0)
. URL has a variant init extension that allows for N RestPath parameters e.g.
let base = "http://localhost:3000"
let url = URL(base: base, RestPath("vets", 0), RestPath("pets"))
print(url.absoluteString) // http://localhost:3000/vets/0/pets