зеркало из https://github.com/electron/electron.git
Documenting net module: fixing linter issues.
This commit is contained in:
Родитель
8c19d3b210
Коммит
7c17aeb6da
|
@ -32,13 +32,13 @@ app.on('ready', () => {
|
|||
const {net} = require('electron')
|
||||
const request = net.request('https://github.com')
|
||||
request.on('response', (response) => {
|
||||
console.log(`STATUS: ${response.statusCode}`);
|
||||
console.log(`HEADERS: ${JSON.stringify(response.headers)}`);
|
||||
console.log(`STATUS: ${response.statusCode}`)
|
||||
console.log(`HEADERS: ${JSON.stringify(response.headers)}`)
|
||||
response.on('data', (chunk) => {
|
||||
console.log(`BODY: ${chunk}`)
|
||||
})
|
||||
response.on('end', () => {
|
||||
console.log('No more data in response.');
|
||||
console.log('No more data in response.')
|
||||
})
|
||||
})
|
||||
request.end()
|
||||
|
|
Загрузка…
Ссылка в новой задаче