question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot use Electron's net module as https protocol

See original GitHub issue

When attempting to replace the https module in request.protocols with the net module from Electron, inside electron’s node environment, the ostensibly compatible module returns a response which has arrays for the values of response headers instead of strings (see electron/electron#8117)

superagent quite reasonably assumes that the response object has string headers and throws a type error when trying to look up the content-type of the response.

The use case here is to use electron’s proxy aware https transport from the nodejs half of electron.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
NilSetcommented, May 22, 2019

Not as excellent!

0reactions
Glorideacommented, May 22, 2019

But it still doesn’t work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot use Electron's net module as https protocol #1439
When attempting to replace the https module in request.protocols with the net module from Electron, inside electron's node environment, ...
Read more >
node.js - Electron Net module return no event - Stack Overflow
I would like use net module in main process Electron , but after new net.request(arg); , i've no events : no response, no...
Read more >
net - Electron.js
The net module is a client-side API for issuing HTTP(S) requests. It is similar to the HTTP and HTTPS modules of Node. js...
Read more >
Electron datasheet | Reference - Particle docs
Datasheet for the Particle Electron, Gen 2 cellular development kit. ... the Photon or the Core, this pin CANNOT be used as an...
Read more >
electron-fetch | Yarn - Package Manager
fetch API. Runs on both Electron and Node.js, using either Electron's net module, or Node.js http module as backend. Make conscious trade-off when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found