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

Rewrite OAuth 1.0 client interface #94

Merged
merged 2 commits into from May 28, 2015
Merged

Rewrite OAuth 1.0 client interface #94

merged 2 commits into from May 28, 2015

Conversation

@hueniverse
Copy link
Member

hueniverse commented May 27, 2015

Closes #92


Wreck[method.toLowerCase()](uri, { headers: { Authorization: header } }, function (err, res, payload) {
var desc = (options.desc || 'resource');

This comment has been minimized.

Copy link
@cjihrig

cjihrig May 28, 2015

Contributor

The parens aren't needed.

This comment has been minimized.

Copy link
@hueniverse

hueniverse May 28, 2015

Author Member

I know. I just like them for readability. It breaks the = from the rest of the statement.

internals.encodePrimitive = function (value) {

var type = typeof value;
if (type === 'boolean') {

This comment has been minimized.

Copy link
@cjihrig

cjihrig May 28, 2015

Contributor

I've heard that V8 can better optimize typeof var === 'value' patterns, so it might be preferable do multiple typeofs instead of caching the type.

This comment has been minimized.

Copy link
@hueniverse

hueniverse May 28, 2015

Author Member

I would stay away from micro optimizations. This code should go away once this no longer supports node 0.10 because we can use the querystring encode override option in 0.12 and io.

geek added a commit that referenced this pull request May 28, 2015
Rewrite OAuth 1.0 client interface
@geek geek merged commit ab59ba4 into master May 28, 2015
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@geek geek deleted the client branch May 28, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.