mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
clean examples
This commit is contained in:
@@ -6,13 +6,13 @@ let password = 'passwd';
|
||||
|
||||
let headers = new Headers();
|
||||
|
||||
//headers.append('Content-Type', 'text/json');
|
||||
headers.append('Content-Type', 'text/json');
|
||||
headers.append('Authorization', 'Basic' + base64.encode(username + ":" + password));
|
||||
|
||||
fetch(url, {method:'GET',
|
||||
headers: headers,
|
||||
credentials: `${user}:${passwd}`
|
||||
fetch(url, {
|
||||
method:'GET',
|
||||
headers: headers
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(json => console.log(json));
|
||||
.then(json => console.log(json))
|
||||
.done();
|
||||
|
||||
@@ -6,13 +6,13 @@ let password = process.env.PASSWORD;
|
||||
|
||||
let headers = new Headers();
|
||||
|
||||
//headers.append('Content-Type', 'text/json');
|
||||
headers.append('Content-Type', 'text/json');
|
||||
headers.append('Authorization', 'Basic' + base64.encode(username + ":" + password));
|
||||
|
||||
fetch(url, {method:'GET',
|
||||
headers: headers,
|
||||
credentials: `${user}:${passwd}`
|
||||
})
|
||||
fetch(url, {
|
||||
method:'GET',
|
||||
headers: headers
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(json => console.log(json));
|
||||
.then(json => console.log(json))
|
||||
.done();
|
||||
|
||||
Reference in New Issue
Block a user