Documenting net module: various fixes.

This commit is contained in:
ali.ibrahim 2016-10-19 18:05:38 +02:00
parent 0d82fbcf37
commit 3b620b8c0c

View file

@ -10,10 +10,10 @@ Following is a non-exhaustive list of why you may need to use the `net` module i
* Support for authenticating proxies using basic, digest, NTLM, Kerberos or negotiate authentication schemes.
* Support for traffic monitoring proxies: Fiddler-like proxies used for access control and monitoring.
The following example quickly shows how the net API mgiht be used:
The following example quickly shows how the `net` API mgiht be used:
```javascript
const {app} = require('electron')
app.on('ready', () => {
const {net} = require('electron')
const request = net.request('https://github.com')
@ -45,7 +45,7 @@ Create a `ClientRequest` instance using the provided `options` object.
## Class: ClientRequest
`ClientRequest` is a [Writable Stream](https://nodejs.org/api/stream.html#stream_writable_streams).
`ClientRequest` implements the [Writable Stream](https://nodejs.org/api/stream.html#stream_writable_streams) interface.
### `new ClientRequest(options)`
@ -201,7 +201,11 @@ A String representing the HTTP status message.
#### `response.headers`
An Object representing the response HTTP headers.
An Object representing the response HTTP headers. The `headers` object is formatted as follows:
* All header names are lowercased.
* Each header name produces an array-valued property on the headers object.
* Each header value is pushed into the array associated with its header name.
#### `response.httpVersion`