Emitted when the http response headers have arrived.
type of event (response)
event listener to use
Emitted when http response data is available.
type of event (data)
event listener to use
Emitted when an error occurs in stream processing
type of event (error)
event listener to use
Emitted when the stream has completed
type of event (end)
event listener to use
Emitted when inline headers are delivered while communicating over H2
type of event (headers)
event listener to use
Begin sending the request.
The stream does nothing until this is called. Call activate() when you are ready for its callbacks and events to fire.
Closes and ends all communication on this stream. Called automatically after the 'end' event is delivered. Calling this manually is only necessary if you wish to terminate communication mid-request/response.
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
HTTP status code returned from the server.
Either the status code, or undefined if the server response has not arrived yet.
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
Stream that sends a request and receives a response.
Create an HttpClientStream with HttpClientConnection.request.
NOTE: The stream sends no data until HttpStream.activate is called. Call HttpStream.activate when you're ready for callbacks and events to fire.