Asynchronously establish a new HttpClientConnection.
Client bootstrap to use when initiating socket connection. Leave undefined to use the default system-wide bootstrap (recommended).
Host to connect to
Port to connect to on host
Socket options
Optional TLS connection options
Optional proxy options
Emitted when the connection is connected and ready to start streams
type of event (connect)
event listener to use
Emitted when an error occurs on the connection
type of event (error)
event listener to use
Emitted when the connection has completed
type of event (close)
event listener to use
Client bootstrap to use when initiating socket connection. Leave undefined to use the default system-wide bootstrap (recommended).
Socket options
Optional TLS connection options
Close the connection. Shutdown is asynchronous. This call has no effect if the connection is already closing.
Forces all written events to be buffered in memory. The buffered data will be flushed when BufferedEventEmitter.uncork is called.
Synchronously calls each of the listeners registered for the event key supplied in registration order. If the BufferedEventEmitter is currently corked, the event will be buffered until BufferedEventEmitter.uncork is called.
The name of the event
Event payload
Create HttpClientStream to carry out the request/response exchange.
NOTE: The stream sends no data until :meth:HttpClientStream.activate()
is called. Call HttpStream.activate when you're ready for
callbacks and events to fire.
The HttpRequest to attempt on this connection
A new stream that will deliver events for the request
Flushes all data buffered since BufferedEventEmitter.cork was called.
NOTE: It is HIGHLY recommended that uncorking should always be done via
process.nextTick
, not during the EventEmitter.on()
call.
Generated using TypeDoc
Represents an HTTP connection from a client to a server