From d1763c43d3c4babeb418aa4d2de6253ef6d64531 Mon Sep 17 00:00:00 2001 From: Braunson Yager Date: Tue, 17 Oct 2017 17:48:46 -0400 Subject: [PATCH 1/2] Added TROUBLESHOOTING + Debug Info Issue #32 --- TROUBLESHOOTING.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 TROUBLESHOOTING.md diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md new file mode 100644 index 0000000..23d444d --- /dev/null +++ b/TROUBLESHOOTING.md @@ -0,0 +1,18 @@ +If you can't find a solution below, please open an [issue](https://github.com/sendgrid/php-http-client/issues). + +## Table of Contents + +* [Viewing the Request Body](#request-body) + + +## Viewing the Request Body + +When debugging or testing, it may be useful to examine the raw request body to compare against the [documented format](https://sendgrid.com/docs/API_Reference/SMTP_API/index.html). + +In the `examples/example.php` file, after your API call use this code to echo out the statuscode, body and headers: + +```php +echo $response->statusCode(); +echo $response->body(); +echo $response->headers(); +``` From c2521857e2088dcb3d4eb502f4a7a98f3e5a2e82 Mon Sep 17 00:00:00 2001 From: Braunson Yager Date: Tue, 17 Oct 2017 17:49:17 -0400 Subject: [PATCH 2/2] Removed unnecessary link --- TROUBLESHOOTING.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index 23d444d..6039b86 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -7,9 +7,7 @@ If you can't find a solution below, please open an [issue](https://github.com/se ## Viewing the Request Body -When debugging or testing, it may be useful to examine the raw request body to compare against the [documented format](https://sendgrid.com/docs/API_Reference/SMTP_API/index.html). - -In the `examples/example.php` file, after your API call use this code to echo out the statuscode, body and headers: +When debugging or testing, it may be useful to examine the raw request body. In the `examples/example.php` file, after your API call use this code to echo out the statuscode, body and headers: ```php echo $response->statusCode();