1.0.2 • Published 2 years ago

keq-url-template v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

keq-url-template

version downloads license dependencies coveralls

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.

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.