Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const auth = {
- username: 'USER',
- password: 'PASS'
- };
- const checkIfDeviceExists = await request.get({
- url: 'https://apiurl',
- auth
- });
- fetch('https://apiurl', {
- method: 'get',
- headers: {
- 'Authorization': 'Basic '+ btoa('USER:PASS') }
- });
Add Comment
Please, Sign In to add comment