зеркало из https://github.com/github/codeql.git
clean examples
This commit is contained in:
Родитель
e85987bfc5
Коммит
7dfb404fd7
|
@ -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();
|
||||
|
|
Загрузка…
Ссылка в новой задаче