Skip to content

Commit 66d264b

Browse files
Merge pull request #280 from pushkyn/troubleshooting-review-request-body
Add "viewing request body" section to troubleshooting
2 parents 8948b7f + ba59272 commit 66d264b

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
@@ -12,6 +12,7 @@ If you can't find a solution below, please open an [issue](https://github.com/se
1212
* [Environment Variables and Your SendGrid API Key](#environment)
1313
* [Using the Package Manager](#package-manager)
1414
* [Android Compatibility](#android)
15+
* [Viewing the Request Body](#request-body)
1516

1617
<a name="migrating"></a>
1718
## Migrating from v2 to v3
@@ -97,3 +98,14 @@ repositories {
9798
Since Android SDK 23, HttpClient is no longer supported. Some workarounds can be found [here](http://stackoverflow.com/questions/32153318/httpclient-wont-import-in-android-studio).
9899

99100
We have an issue to remove that dependency [here](https://github.com/sendgrid/java-http-client/issues/2), please upvote to move it up the queue.
101+
102+
<a name="request-body"></a>
103+
## Viewing the Request Body
104+
105+
When debugging or testing, it may be useful to exampine the raw request body to compare against the [documented format](https://sendgrid.com/docs/API_Reference/api_v3.html).
106+
107+
You can do this right before you call `request.setBody(mail.build())` like so:
108+
109+
```java
110+
System.out.println(mail.build());
111+
```

0 commit comments

Comments
 (0)