Documenting ClientRequest constructor options.

This commit is contained in:
ali.ibrahim 2016-10-20 11:58:06 +02:00
parent fdfa0f4a6d
commit 69790bd7ed

View file

@ -83,6 +83,18 @@ If it is an object, it is expected to fully specify an HTTP request via the foll
`options` properties `protocol`, `host`, `hostname`, `port` and `path` strictly
follow the Node.js model as described in the [URL](https://nodejs.org/api/url.html) module.
For instance, we could have created the same request to 'github.com' as follows:
```JavaScript
const request = net.request({
method: 'GET',
protocol: 'https:',
hostname: 'github.com',
port: 443,
path: '/'
})
```
### Instance Events
#### Event: 'response'