diff options
author | Thomas Huang <tmashuang@users.noreply.github.com> | 2018-06-05 07:37:58 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-05 07:37:58 +0800 |
commit | e1cd3562cef92a78945056dc557d4228a72b119c (patch) | |
tree | 0d4a7cbe1c095085744ed27f59453667d5b41c88 /app/scripts/lib/bug-notifier.js | |
parent | 750ec8769931f8db30ebb5e8e8bcc61816368800 (diff) | |
parent | c12b02b4af75d6d706d0b8cd9aeb07f18aa3037a (diff) | |
download | tangerine-wallet-browser-e1cd3562cef92a78945056dc557d4228a72b119c.tar tangerine-wallet-browser-e1cd3562cef92a78945056dc557d4228a72b119c.tar.gz tangerine-wallet-browser-e1cd3562cef92a78945056dc557d4228a72b119c.tar.bz2 tangerine-wallet-browser-e1cd3562cef92a78945056dc557d4228a72b119c.tar.lz tangerine-wallet-browser-e1cd3562cef92a78945056dc557d4228a72b119c.tar.xz tangerine-wallet-browser-e1cd3562cef92a78945056dc557d4228a72b119c.tar.zst tangerine-wallet-browser-e1cd3562cef92a78945056dc557d4228a72b119c.zip |
Merge pull request #4490 from MetaMask/v4.7.3
Version 4.7.3
Diffstat (limited to 'app/scripts/lib/bug-notifier.js')
-rw-r--r-- | app/scripts/lib/bug-notifier.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/scripts/lib/bug-notifier.js b/app/scripts/lib/bug-notifier.js new file mode 100644 index 000000000..4d305b894 --- /dev/null +++ b/app/scripts/lib/bug-notifier.js @@ -0,0 +1,22 @@ +class BugNotifier { + notify (uri, message) { + return postData(uri, message) + } +} + +function postData(uri, data) { + return fetch(uri, { + body: JSON.stringify(data), // must match 'Content-Type' header + credentials: 'same-origin', // include, same-origin, *omit + headers: { + 'content-type': 'application/json', + }, + method: 'POST', // *GET, POST, PUT, DELETE, etc. + mode: 'cors', // no-cors, cors, *same-origin + }) +} + +const notifier = new BugNotifier() + +module.exports = notifier + |