Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add http method to output #4

Merged
merged 1 commit into from
Dec 12, 2015

Conversation

sdepold
Copy link
Contributor

@sdepold sdepold commented Dec 10, 2015

Great project :)

This PR prepends the http method to the requested URL.

@@ -22,18 +22,20 @@ function time(start) {

function defaultHandler(request, options, cb) {
var url = (typeof options === 'string' ? urlParse(options) : options).href;
var method = '[' + options.method + ']';
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options.method can be undefined quite often

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah ok. Are you fine with the idea in general? I would add fallback to get then

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just do options.method || 'GET'. That is accurate according to the API.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed!

@sdepold sdepold force-pushed the feature/http-method branch from dbb2464 to 1250e01 Compare December 11, 2015 21:33
floatdrop added a commit that referenced this pull request Dec 12, 2015
@floatdrop floatdrop merged commit 3419aaf into floatdrop:master Dec 12, 2015
@floatdrop
Copy link
Owner

Sweet, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants