-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.js
More file actions
25 lines (23 loc) · 696 Bytes
/
Copy pathtest.js
File metadata and controls
25 lines (23 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
const axios = require('axios');
const url = 'http://ballchasing.com/api/groups/macaroni-league-0p6avqc0gv'
const apiKey = ''
const options = {
headers: {
'Access-Control-Allow-Origin': '*',
'Access-Control-Allow-Methods': 'GET, POST, PATCH, PUT, DELETE, OPTIONS',
'Access-Control-Allow-Headers': 'Content-Type',
'Target-URL': 'https://ballchasing.com/api/',
'crossorigin': true,
'Authorization': apiKey,
}
}
axios.get(url, options)
.then((res) => {
let deez = JSON.stringify(res.data)
console.log(deez)
})
.catch((error) => {
console.log(apiKey)
console.error(error)
return error
})