Skip to content

Commit 3b91005

Browse files
committed
Update Troubleshooting docs
1 parent 9d0e01d commit 3b91005

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

TROUBLESHOOTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ If you can't find a solution below, please open an [issue](https://github.com/se
1313
* [Environment Variables and Your SendGrid API Key](#environment)
1414
* [Using the Package Manager](#package-manager)
1515
* [Rails Specifics](#rails-specifics)
16+
* [Viewing the Request Body](#request-body)
1617

1718
<a name="migrating"></a>
1819
## Migrating from v2 to v3
@@ -115,3 +116,14 @@ gem install sendgrid-ruby -v X.X.X
115116
## Rails Specifics
116117

117118
- Namespace collision between Rails own `Mail` class and sendgrid class `Mail`. To avoid that issues please use `SendGrid::Mail` instead.
119+
120+
<a name="request-body"></a>
121+
## Viewing the Request Body
122+
123+
When debugging or testing, it may be useful to exampine the raw request header to compare against the [documented format](https://sendgrid.com/docs/API_Reference/api_v3.html).
124+
125+
You can do this before `response = sg.client.mail._('send').post(request_body: mail.to_json)` like so:
126+
127+
```ruby
128+
puts mail
129+
```

0 commit comments

Comments
 (0)