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

Created TROUBLESHOOTING.md file in standard SendGrid format. Added se… #26

Merged
merged 1 commit into from
Oct 20, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
40 changes: 40 additions & 0 deletions TROUBLESHOOTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
If you have a non-library SendGrid issue, please contact our [support team](https://support.sendgrid.com).

If you can't find an issue below, please open an [issue](https://github.com/sendgrid/smtpapi-go/issues).


## Table of Contents
* [Viewing the Request Body](#request-body)

<a name="request-body"></a>
## Viewing the request body

If you are having issues with the SMTPAPI, or it is not acting in the way you expect,
viewing the instructions you are sending is a good place to start your troubleshooting.

You can view the headers we are passing to the SendGrid API in the following way.

```golang
package main

import (
"fmt"
"github.com/sendgrid/smtpapi-go"
)

func main(){
//instantiate NewSMTPAPIHeader
header := smtapi.NewSMTPAPIHeader()

//Set some value
header.AddCategory("NewUser")

fmt.Println(header.JSONString())
}
```

```json
{"category":["NewUser"]} <nil>
```

Now you can ensure that your headers add up to your desired behaviour.