network-uri-template: Library for parsing and expanding URI Templates, as per RFC 6570
As per the RFC,
For example, the following URI Template includes a form-style
parameter expression, as indicated by the "?" operator appearing
before the variable names.
http:/www.example.comfoo{?query,number}
The expansion process for expressions beginning with the question-
mark ("?") operator follows the same pattern as form-style interfaces
on the World Wide Web:
http:/www.example.comfoo{?query,number}
_____________/
|
|
For each defined variable in [ query, number ],
substitute "?" if it is the first substitution or "&"
thereafter, followed by the variable name, =, and the
variable's value.
If the variables have the values
query := "mycelium"
number := 100
then the expansion of the above URI Template is
http:/www.example.comfoo?query=mycelium&number=100
Alternatively, if query is undefined, then the expansion would be
http:/www.example.comfoo?number=100
or if both variables are undefined, then it would be
http:/www.example.comfoo
This library handles expanding such templates.
[Skip to Readme]
Modules
[Index] [Quick Jump]
Downloads
- network-uri-template-0.1.1.4.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1.0.0, 0.1.1.0, 0.1.1.1, 0.1.1.2, 0.1.1.3, 0.1.1.4 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.16.4.0 && <5), containers (>=0.6.5.1), megaparsec (>=9.2.2), network-uri (>=2.6.4.2), network-uri-template, optparse-applicative (>=0.18.1.0), prettyprinter (>=1.7.1), prettyprinter-ansi-terminal (>=1.1.3), text (>=1.2.5.0) [details] |
| License | AGPL-3.0-only |
| Author | |
| Maintainer | Pat Brisbin |
| Category | Web |
| Uploaded | by PatrickBrisbin at 2025-11-11T21:42:53Z |
| Distributions | |
| Executables | network-uri-template |
| Downloads | 15 total (15 in the last 30 days) |
| Rating | (no votes yet) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs available [build log] Last success reported on 2025-11-11 [all 1 reports] |
