Re: [whatwg/url] Add some sort of URI template API? (#192)

Note that #369 touches on this a tiny bit by defining how an external string would be encoded.

https://github.com/wanderview/service-worker-scope-pattern-matching is also of interest, but that's not really about URL construction, more about matching.

As for templating, seems it would be doable to build this on top of `new URL()` as ```URL.fromTemplate`https://example.com/date/${color}/${shape}/```` and `fromTemplate` would take care of percent encoding per the rules we decide on in #369 (and perhaps we also ought to expose those separately). The challenge here would be if templating has to work beyond path/query/fragment as that would require quite a bit of special casing that might be trickier to do, but it's not clear to me that's needed.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/192#issuecomment-626289492

Received on Sunday, 10 May 2020 08:02:20 UTC