Skip to content
This repository has been archived by the owner on Aug 20, 2020. It is now read-only.

docs: Adds example to review request body for troubleshooting. #30

Merged
merged 1 commit into from
Oct 29, 2017

Conversation

mukulmishra18
Copy link
Contributor

Fixes #13 .

@SendGridDX
Copy link

SendGridDX commented Oct 23, 2017

CLA assistant check
All committers have signed the CLA.

@@ -0,0 +1,26 @@
If you have a non-library SendGrid issue, please contact our [support team](https://support.sendgrid.com).

If you can't find a solution below, please open an [issue](https://github.com/sendgrid/sendgrid-python/issues).
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you please change this from 'sendgrid-python' to 'nodejs-http-client' ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, my bad! I will fix it. Thanks.


You can do this with something like:
```javascript
var requestPost = client.emptyRequest()
Copy link
Contributor

Choose a reason for hiding this comment

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

Would you be up for using one of the examples here to show how this pattern can be used to print the request body?

Copy link
Contributor Author

@mukulmishra18 mukulmishra18 Oct 27, 2017

Choose a reason for hiding this comment

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

Sorry, I did not get it properly. I think I already added how to log request body here, before sending the POST request. Should I have to log requestPost.body here also?

console.log(requestPost.body)

client.API(requestPost, (response) => { })
```
Copy link
Contributor

Choose a reason for hiding this comment

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

One more request! Would you be up for adding a section on logging the response using one of the examples here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done with new commit. Thanks.

@mukulmishra18
Copy link
Contributor Author

@mbernier can you please check this PR and let me know if anything else needs to be done?

@mbernier
Copy link
Contributor

I think we're good to go!

@thinkingserious
Copy link
Contributor

Hello @mukulmishra18,

Thanks again for the PR!

We want to show our appreciation by sending you some swag. Could you please fill out this form so we can send it to you? Thanks!

Team SendGrid DX

@mukulmishra18
Copy link
Contributor Author

Hi @thinkingserious, Filled the form. Thanks!

@thinkingserious thinkingserious changed the title Adds example to review request body for troubleshooting. docs: Adds example to review request body for troubleshooting. Dec 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Demonstrate how to review the request body for troubleshooting
4 participants