Implemented uri as first and optional config functionality for Issue #173
Would be great if this format was supported:
so we don't have to put uri in the options config.
Makes it more clear what uri we are trying to connect to.
Also since the uri is mandatory to provide, it makes sense that the options config is for optional config only.
Also added a test and called test-params.js to test this new feature, may not be the best name. :)
implemented issue #173 allow uri to be first argument
removed debug line and reset ports
this looks great.
It looks like this will fail when defaults() is used, defaults() only has (opts, callback).
@shimaore defaults should still work, even though the request method supports uri, options, callback, it should still support (options, callback), (uri), and (options). At least all the test cases in the test-params.js file pass, plus all existing test cases still pass. I also submitted a pull request for supporting the same api for the post, put, head and del short cuts see #180
defaults wraps all the individual methods and doesn't recognize the new argument pattern.
Got it, working on it, should have something by the end of day.