-
Notifications
You must be signed in to change notification settings - Fork 41
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
Conversation
@@ -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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -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; |
There was a problem hiding this comment.
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 😄
Closes #187