Skip to content

Commit 5916c11

Browse files
committed
Add usage doc for StackTrace.report() for custom request headers
1 parent 2e8dbc2 commit 5916c11

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Given a function that has been instrumented, revert the function to it's origina
137137

138138
* **fn: Function** - Instrumented Function
139139

140-
#### `StackTrace.report(stackframes, url, message)` => [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)(String)
140+
#### `StackTrace.report(stackframes, url, message, requestOptions)` => [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)(String)
141141
Given an an error message and Array of StackFrames, serialize and POST to given URL. Promise is resolved with response text from POST request.
142142

143143
Example JSON POST data:
@@ -152,9 +152,10 @@ Example JSON POST data:
152152
}
153153
```
154154

155-
* **message: String** - The error message
156155
* **stackframes: Array([StackFrame](https://github.com/stacktracejs/stackframe))** - Previously wrapped Function
157156
* **url: String** - URL to POST stack JSON to
157+
* **message: String** - The error message
158+
* **requestOptions: Object** - HTTP request options object. Only `headers: {key: val}` is supported.
158159

159160
## Browser Support
160161
[![Sauce Test Status](https://saucelabs.com/browser-matrix/stacktracejs.svg)](https://saucelabs.com/u/stacktracejs)

0 commit comments

Comments
 (0)