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

Added setting debug in initialization #188

Merged
merged 3 commits into from
Nov 2, 2016

Conversation

aydrian
Copy link
Contributor

@aydrian aydrian commented Nov 2, 2016

Closes #187

@aydrian aydrian added this to the 2.0.0 Release milestone Nov 2, 2016
@@ -106,6 +108,9 @@ SparkPost.prototype.request = function(options, callback) {
options.gzip = true;
}

// set debug
options.debug = (typeof options.debug === 'boolean') ? options.debug : this.debug;
Copy link
Contributor

Choose a reason for hiding this comment

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

couldn't we just use this.debug?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So only set it at the top level? Not give the ability to override or set it all the individual call level? I mean... sure. Maybe I'm just overthinking it.

Copy link
Contributor

Choose a reason for hiding this comment

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

oh... i didn't get what this was doing... right, so this line is setting the override for a single call, defaulting to the client config. I got it now 😄

Copy link
Contributor

@colestrode colestrode left a comment

Choose a reason for hiding this comment

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

lgtm :shipit:

@@ -106,6 +108,9 @@ SparkPost.prototype.request = function(options, callback) {
options.gzip = true;
}

// set debug
options.debug = (typeof options.debug === 'boolean') ? options.debug : this.debug;
Copy link
Contributor

Choose a reason for hiding this comment

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

oh... i didn't get what this was doing... right, so this line is setting the override for a single call, defaulting to the client config. I got it now 😄

@aydrian aydrian merged commit 920a81f into SparkPost:wip-2.0.0 Nov 2, 2016
@aydrian aydrian deleted the issue-187 branch November 2, 2016 18:41
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.

None yet

2 participants