chore: fix lint:js-in-markdown script (#38260)
This commit is contained in:
parent
0149ae72e6
commit
eeb1e7d499
26 changed files with 1078 additions and 586 deletions
|
@ -65,7 +65,7 @@ strictly follow the Node.js model as described in the
|
|||
|
||||
For instance, we could have created the same request to 'github.com' as follows:
|
||||
|
||||
```JavaScript
|
||||
```javascript
|
||||
const request = net.request({
|
||||
method: 'GET',
|
||||
protocol: 'https:',
|
||||
|
@ -104,7 +104,7 @@ The `callback` function is expected to be called back with user credentials:
|
|||
* `username` string
|
||||
* `password` string
|
||||
|
||||
```JavaScript
|
||||
```javascript
|
||||
request.on('login', (authInfo, callback) => {
|
||||
callback('username', 'password')
|
||||
})
|
||||
|
@ -113,9 +113,9 @@ request.on('login', (authInfo, callback) => {
|
|||
Providing empty credentials will cancel the request and report an authentication
|
||||
error on the response object:
|
||||
|
||||
```JavaScript
|
||||
```javascript
|
||||
request.on('response', (response) => {
|
||||
console.log(`STATUS: ${response.statusCode}`);
|
||||
console.log(`STATUS: ${response.statusCode}`)
|
||||
response.on('error', (error) => {
|
||||
console.log(`ERROR: ${JSON.stringify(error)}`)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue