keq-url-template
v1.0.2
Published
Convert swagger path to uri path.(eg. /user/{id} -> /user/:id)
Downloads
1
Maintainers
Readme
keq-url-template
Convert swagger path to uri path.(eg. /user/{id} -> /user/:id), according to the RFC 6570 URI Template
Usage
import { request } from 'keq'
import urlTemplate from 'keq-url-template'
request.use(urlTemplate())
// Will send request to 'www.example.com/user/1'
request
.get('www.example.com/user/{id}')
.params('id', 1)
.end()
Sponsor
Support code development on patron.
Contributing & Development
If there is any doubt, it is very welcome to discuss the issue together. Please read Contributor Covenant Code of Conduct and CONTRIBUTING.