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
iface.httpAgent()
let iface = ...; let {host, port} = iface.settings; let agent1 = iface.httpAgent(); let agent2 = iface.httpAgent(); request(`http://${host}:${port}/shelly`, { agent1 }, (err, result) => { console.log("HTTP REquest /shelly", err || result.body); }); request(`http://${host}:${port}/settings`, { agent2 }, (err, result) => { console.log("HTTP REquest /settings", err || result.body); });
This breaks http requests. A quick fix in the class.interface.js:
class.interface.js
let agentCreated = null; ... httpAgent(options = {}) { if (agentCreated) { return agentCreated; } ... agentCreated = agent; return agent; }
Solves it.
Is there a better way?
The text was updated successfully, but these errors were encountered:
d0a2c3e
No branches or pull requests
This breaks http requests. A quick fix in the
class.interface.js
:Solves it.
Is there a better way?
The text was updated successfully, but these errors were encountered: