Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve use in Electron #311

Merged
merged 1 commit into from
May 19, 2017
Merged

Improve use in Electron #311

merged 1 commit into from
May 19, 2017

Conversation

sindresorhus
Copy link
Owner

When used in Electron, we can take advantage of its net module, which is documented to be compatible with the Node.js http module, but brings automatic proxy support and more.

It seems to work fine running in this test app:

const electron = require('electron');
const got = require('got');

electron.app.on('ready', () => {
	got('https://api.npms.io/v2/search?q="author:sindresorhus"').then(console.log).catch(console.error);
});
$ electron x.js

When used in Electron, we can take advantage of its `net` module, which is documented to be compatible with the Node.js `http` module, but brings automatic proxy support and more.
@sindresorhus sindresorhus requested a review from floatdrop May 19, 2017 09:24
Copy link
Contributor

@alextes alextes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants