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

Latest commit

 

History

History
30 lines (23 loc) · 1006 Bytes

TROUBLESHOOTING.md

File metadata and controls

30 lines (23 loc) · 1006 Bytes

If you have a non-library SendGrid issue, please contact our support team.

If you can't find a solution below, please open an issue.

Table of Contents

Viewing the Request Body

When debugging or testing, it may be useful to examine the raw request body to compare against the documented format.

You can do this with something like:

var requestPost = client.emptyRequest()
requestPost.method = 'POST'
requestPost.path = '/v3/api_keys'
requestPost.body = { data: 'some test data' }
requestPost.headers['X-Test'] = 'test'

// Log request body before sending POST request.
console.log(requestPost.body)

client.API(requestPost, (response) => {
  // Log the response.
  console.log(response.statusCode)
  console.log(response.body)
  console.log(response.headers)
})