mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
22 lines
466 B
JavaScript
22 lines
466 B
JavaScript
|
|
//Use of axios as a global variable instead of an imported module to make Ajax calls
|
|
var testvar = function () {
|
|
axios({
|
|
method: 'get',
|
|
url: url,
|
|
}).then(function (response) {
|
|
console.log(response.data) })
|
|
|
|
|
|
|
|
axios({
|
|
method: 'post',
|
|
url: url,
|
|
headers: { 'Content-Type': 'application/json' },
|
|
data: {x: 'test', y:'test'}
|
|
}).then(function (response) {
|
|
console.log(response.data) })
|
|
}
|
|
|
|
|