You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-1
Original file line number
Diff line number
Diff line change
@@ -100,7 +100,11 @@ $sparky = new SparkPost($httpClient, ['key'=>'YOUR_API_KEY']);
100
100
* Type: `Boolean`
101
101
* Default: `true`
102
102
*`async` defines if the `request` function sends an asynchronous or synchronous request. If your client does not support async requests set this to `false`
103
-
103
+
*`options.debug`
104
+
* Required: No
105
+
* Type: `Boolean`
106
+
* Default: `false`
107
+
* If `debug` is true, then then all `SparkPostResponse` and `SparkPostException` instances will return any array of the request values through the function `getRequest`
104
108
105
109
## Methods
106
110
### request(method, uri [, payload [, headers]])
@@ -299,6 +303,8 @@ An exception will be thrown in two cases: there is a problem with the request or
299
303
* Returns the exception message
300
304
***getBody()**
301
305
* If there is a response body it returns it as an `Array`. Otherwise it returns `null`.
306
+
***getRequest()**
307
+
* Returns an array with the request values `method`, `url`, `headers`, `body` when `debug` is `true`
0 commit comments