Refine rest.js request object

The params object on the request will automatically place params values into the query string. There is no need to manually build the URL path via string concatenation.

Using the params object will also ensure the content is properly encoded, avoiding potential URL injection attacks.
Merge pull request #1 from scothis/patch-1

Refine rest.js request object