Skip to content

Commit

Permalink
Merge pull request #26 from cal97g/master
Browse files Browse the repository at this point in the history
Created TROUBLESHOOTING.md file in standard SendGrid format. Added se…
  • Loading branch information
Matt Bernier committed Oct 20, 2017
2 parents 071a4d0 + 45c813f commit e59f9de
Showing 1 changed file with 40 additions and 0 deletions.
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.

0 comments on commit e59f9de

Please sign in to comment.