0.0.4 • Published 10 years ago

rest-url v0.0.4

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

rest-url

Makes a RESTful url from an endpoint and params

Build Status

An endpoint looks like http://foo/:bar/:moo :bar and :moo will be replaced by matching params. params not found in the endpoint will be added on the end as query params.

In other words

var restUrl = require('rest-url');
restUrl.make("http://foo/:bar/:moo", {
   bar: "aaa",
   moo: "bbb",
   pow: "what",
   ya: "a b",
});

returns

http://foo/aaa/bbb?pow=what&ya=a%20b
0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago