mirror of
https://github.com/electron/electron.git
synced 2026-01-08 23:18:06 -05:00
Documenting ClientRequest constructor options.
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user