From 33cbb6ffcf4cf9d8a735531fcc9ca81b4196efd4 Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Tue, 3 Oct 2017 15:14:17 +0700 Subject: [PATCH] Make the `useElectron` option `false` by default Fixes #359 Related to #315 `electron.net` is just too buggy. --- index.js | 2 +- readme.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 14a5879c1..cb55f7d6a 100644 --- a/index.js +++ b/index.js @@ -435,7 +435,7 @@ function normalizeArguments(url, opts) { path: '', retries: 2, decompress: true, - useElectronNet: true + useElectronNet: false }, url, { diff --git a/readme.md b/readme.md index 16b1c4a42..65e019c17 100644 --- a/readme.md +++ b/readme.md @@ -173,9 +173,9 @@ If this is disabled, a compressed response is returned as a `Buffer`. This may b ###### useElectronNet Type: `boolean`
-Default: `true` +Default: `false` -When used in Electron, Got will automatically use [`electron.net`](https://electron.atom.io/docs/api/net/) instead of the Node.js `http` module. It should be fully compatible, but you can turn it off here if you encounter a problem. Please open an issue if you do! +When used in Electron, Got will use [`electron.net`](https://electron.atom.io/docs/api/net/) instead of the Node.js `http` module. According to the Electron docs, it should be fully compatible, but it's not entirely. See [#315](https://github.com/sindresorhus/got/issues/315). #### Streams