We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Investigate how the HTTP API can be used with a nodejs or electron application
The text was updated successfully, but these errors were encountered:
Using named pipes with the request-library always returns 40 Bad request.
request
40 Bad request
With the got-library as follows it works:
got
const got = require('got'); const options = { url: `http://unix://?/pipe/crc-http:/api/status`, method: 'GET' }; function callback(error, response, body) { if (!error && response.statusCode == 200) { const status = JSON.parse(body); console.log(status) } else { console.log(response.statusCode) console.log(error) } } got(options, callback);
node-fetch-library returns 404 Not Found for all calls using a named pipe.
node-fetch
404 Not Found
electron-fetch also does not work as expected.
electron-fetch
Sorry, something went wrong.
Concluded; when named pipes are used in combination with HTTP and Electron, it would be suggested to use got.
From the got-library README
Electron support has been removed The Electron net module is not consistent with the Node.js http module. See #899 for more info.
net
http
Which means the useElectronNet: true option is not available anymore. It therefore relies on the nodejs http module.
useElectronNet: true
https://github.com/gbraad/crc-tray-electron
gbraad
No branches or pull requests
Investigate how the HTTP API can be used with a nodejs or electron application
The text was updated successfully, but these errors were encountered: