Skip to content

Commit 7cf423f

Browse files
committed
Add Raven.setTransport
1 parent 9cac1a0 commit 7cf423f

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/raven.js

+15
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,21 @@ var Raven = {
359359
return Raven;
360360
},
361361

362+
/**
363+
* Override the default HTTP transport mechanism that transmits data
364+
* to the Sentry server.
365+
*
366+
* @param {function} transport Function invoked instead of the default
367+
* `makeRequest` handler.
368+
*
369+
* @return {Raven}
370+
*/
371+
setTransport: function(transport) {
372+
globalOptions.transport = transport;
373+
374+
return Raven;
375+
},
376+
362377
/*
363378
* Get the latest raw exception that was captured by Raven.
364379
*

0 commit comments

Comments
 (0)