"Fossies" - the Fresh Open Source Software Archive

Member "electron-4.2.12/docs/api/incoming-message.md" (16 Oct 2019, 2152 Bytes) of package /linux/www/electron-4.2.12.tar.gz:

As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field. See also the last Fossies "Diffs" side-by-side code changes report for "incoming-message.md": 6.1.0_vs_7.0.0.

Class: IncomingMessage

Handle responses to HTTP/HTTPS requests.

Process: Main

IncomingMessage implements the Readable Stream interface and is therefore an EventEmitter.

Instance Events

Event: ‘data’


The data event is the usual method of transferring response data into applicative code.

Event: ‘end’

Indicates that response body has ended.

Event: ‘aborted’

Emitted when a request has been canceled during an ongoing HTTP transaction.

Event: ‘error’


error Error - Typically holds an error string identifying failure root cause.

Emitted when an error was encountered while streaming response data events. For instance, if the server closes the underlying while the response is still streaming, an error event will be emitted on the response object and a close event will subsequently follow on the request object.

Instance Properties

An IncomingMessage instance has the following readable properties:


An Integer indicating the HTTP response status code.


A String representing the HTTP status message.


An Object representing the response HTTP headers. The headers object is formatted as follows:


A String indicating the HTTP protocol version number. Typical values are ‘1.0’ or ‘1.1’. Additionally httpVersionMajor and httpVersionMinor are two Integer-valued readable properties that return respectively the HTTP major and minor version numbers.


An Integer indicating the HTTP protocol major version number.


An Integer indicating the HTTP protocol minor version number.