mixpanel-node icon indicating copy to clipboard operation
mixpanel-node copied to clipboard

added ability to specify request options via config

Open zeevl opened this issue 11 years ago • 0 comments

this allows the consumer to supply additional options to the http.get request call by doing

   mixpanel.init('....', { request_options: { scheme: 'http' }});

The longer story is, i'm using the module from within a chrome extension. That extension sometimes makes mixpanel calls from a window whose protocol is chrome-extension://. Since no scheme is specified, http uses the document's scheme, so the request ends up being chrome-extension://api.mixpanel.com.... fail.

Updated tests, everything still pases.

zeev

zeevl avatar Aug 29 '14 21:08 zeevl