Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let token = {
- "access_token":"eyJhbGciOiJSUzI1NiJ9.eyJqdGIsImhpc3Rvcmlhbl9z87rks8V38Q"
- };
- const checkAPI = document.querySelector('#checkAPI');
- checkAPI.addEventListener('click', checkHistorianAPI);
- let url = `http://10.1.1.31:80/historian-rest-api/v1/tags?nameMask=*&maxNumber=100`;
- async function checkHistorianAPI() {
- let response = await fetch(url, {
- method: 'get',
- headers: {
- "Authorization": `Bearer ${token.access_token}`,
- 'mode': 'cors'
- }});
- console.log(response);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement