fix: match net module headers & http.IncomingMessage headers (#17517)

* fix: match net module headers & http.IncomingMessage headers

* update net doc for cleanliness

* address feedback from review

* Update spec/api-net-spec.js

Co-Authored-By: codebytere <codebytere@github.com>

* add special cookie case
This commit is contained in:
Shelley Vohr 2019-04-02 07:41:19 -07:00 committed by GitHub
parent 7c6cedb119
commit 8ea33d69ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 145 additions and 30 deletions

View file

@ -21,13 +21,10 @@ module instead of the native Node.js modules:
* Support for traffic monitoring proxies: Fiddler-like proxies used for access
control and monitoring.
The `net` module API has been specifically designed to mimic, as closely as
possible, the familiar Node.js API. The API components including classes,
methods, properties and event names are similar to those commonly used in
The API components (including classes, methods, properties and event names) are similar to those used in
Node.js.
For instance, the following example quickly shows how the `net` API might be
used:
Example usage:
```javascript
const { app } = require('electron')
@ -48,10 +45,6 @@ app.on('ready', () => {
})
```
By the way, it is almost identical to how you would normally use the
[HTTP](https://nodejs.org/api/http.html)/[HTTPS](https://nodejs.org/api/https.html)
modules of Node.js
The `net` API can be used only after the application emits the `ready` event.
Trying to use the module before the `ready` event will throw an error.