Skip to content

Commit de9677d

Browse files
committed
updated docs
1 parent 0bee98b commit de9677d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ $sparky = new SparkPost($httpClient, ['key'=>'YOUR_API_KEY']);
100100
* Type: `Boolean`
101101
* Default: `true`
102102
* `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`
104108

105109
## Methods
106110
### 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
299303
* Returns the exception message
300304
* **getBody()**
301305
* 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`
302308

303309

304310
### Contributing

0 commit comments

Comments
 (0)