-
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
Returns body.results or body as a response. Added debug support. #112
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* `data.res` - full response from request client | ||
* `data.body` - payload from response | ||
* `data` - results from API call | ||
* `data.debug` - full response from request client |
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.
I would add "when options.debug
is true"
I think this is pretty good, I ran through some tests and the interface looks a lot better. |
aydrian
added a commit
that referenced
this pull request
Oct 27, 2016
* Added json flag to base request and tests to check for JSON response * Fixed a couple misspellings * Returns body.results or body as a response. Added debug support. (#112) * Now returning body.results or body as a response. Added debug support. * Updated documents and examples * Updating newly merged code * Updated debug flag doc in README.md * clean up from 1.x merge * Implement promise support (#154) * added promise support to base object * updated sendingDomains for promise support * updated inboundDomains for promise support * updated messageEvents for promise support * updated recipientLists for promise support * updated relayWebhooks for promise support * updated subaccounts for promise support * updated suppressionList for promise support * updated templates for promise support * updated transmissions for promise support * updated webhooks for promise support * Replaced bluebird with native promise support for PR #154 * removed dependency for bluebird * replaced bluebird on spec tests * Switched JSHint for ESLint with SparkPost config (#159) * Switched JSHint for ESLint with SparkPost config * modified lint npm script to remove node_modules path * Removed support for nodejs versions .10 & .12 (#157) * Removed testing of nodejs versions .10 & .12, added lastest stable, 5, & 6 * latest is 6 so added 4 * reverting the npm version * Switch to using npm scripts instead of grunt (#160) * Remove coveralls task from grunt * removed testing and coverage from grunt * Removed unneed npm deps * Updated docs to remove grunt references * Added npm version scripts & removed Grunt * Removed SendGrid Compatibility (#162) * Set options.json=true for GET requests (#163) * Setting options.json=true for GET requests * Fixed tests * Refactored transmissions library (#158) * Refactored transmissions library & updated tests for promises * merge flub, extra comma in package.json * Updated transmission docs and examples * Documentation updates * Updated webhooks lib and tests * Updated webhooks doc and examples * updated tests for payloads and cloneDeep * validates required parameters and jsdocs to webhooks wrapper * update docs for webhooks * updated docs, tests, and examples * eslint fixes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
options.json = true
for all requests.body
from request.body.results || body
as responseoptions.debug
flag which will include the requestresponse
object as adebug
property on response. (aids in testing)Closes #81