Add `createConnection` option for http or https requests
See original GitHub issueHi,
I need a possibility of using createConnection
option in the http/https request:
createConnection <Function> A function that produces a socket/stream to use for the request when the agent option is not used. This can be used to avoid creating a custom Agent class just to override the default createConnection function. See agent.createConnection() for more details. Any Duplex stream is a valid return value.
You can read more info about this function in the Node.js documentation: https://nodejs.org/api/http.html#http_http_request_options_callback
NOTE: The createConnection
of globalAgent
isn’t suitable for me because I use other connections
P.S. Thanks for your work and the best library for EventSource.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
createConnection option not work for https module #24543
I thinks it's because net.createConnection() and port 80 use HTTP, not HTTPS. The HTTPS agent's createConnection() is built around tls.connect() ...
Read more >Node.js: Relationship among http.Server, http.Agent, sockets ...
The function agent.createConnection() is used when you want to avoid creating a custom agent as well as http.globalAgent . This function ...
Read more >HTTP | Node.js v19.3.0 Documentation
Class: http.Agent # · new Agent([options]) · agent.createConnection(options[, callback]) · agent.keepSocketAlive(socket) · agent.reuseSocket(socket, request) · agent ...
Read more >Manage connections in Azure Functions - Microsoft Learn
Among those shared resources are connections: HTTP connections, ... scale controller adds function app instances to handle more requests, ...
Read more >Using the Node.js Driver - Snowflake Documentation
createConnection to create a new Connection object, and pass in a JavaScript object that ... Use this property to specify the HTTP protocol:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This would be extremely helpful as there doesn’t currently seem to be a way to use UNIX domain sockets with this library.
Can we get a ruling on this?