@@ -154,6 +154,54 @@ Optional settings
154
154
By default, raven truncates messages to a max length of 100
155
155
characters. You can customize the max length with this parameter.
156
156
157
+ .. describe :: transport
158
+
159
+ Override the default HTTP data transport handler.
160
+
161
+ Alternatively, can be specified using ``Raven.setTransport(myTransportFunction) ``.
162
+
163
+ .. code-block :: javascript
164
+
165
+ {
166
+ transport : function (options ) {
167
+ // send data
168
+ }
169
+ }
170
+
171
+ The provided function receives a single argument, ``options ``, with the following properties:
172
+
173
+ url
174
+ The target url where the data is sent.
175
+
176
+ data
177
+ The outbound exception data.
178
+
179
+ For POST requests, this should be JSON-encoded and set as the
180
+ HTTP body (and transferred as Content-type: application/json).
181
+
182
+ For GET requests, this should be JSON-encoded and passed over the
183
+ query string with key ``sentry_data ``.
184
+
185
+ auth
186
+ An object representing authentication data. This should be converted to urlencoded key/value pairs
187
+ and passed as part of the query string, for both GET and POST requests.
188
+
189
+ The auth object has the following properties:
190
+
191
+ sentry_version
192
+ The API version of the Sentry server.
193
+ sentry_client
194
+ The name and version of the Sentry client of the form ``client/version ``.
195
+ In this case, ``raven-js/${Raven.VERSION} ``.
196
+ sentry_key
197
+ Your public client key (DSN).
198
+
199
+ onSuccess
200
+ Callback to be invoked upon a successful request.
201
+
202
+ onFailure
203
+ Callback to be invoked upon a failed request.
204
+
157
205
Putting it all together
158
206
-----------------------
159
207
0 commit comments