Guest User

Untitled

a guest
Jan 13th, 2018
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. const auth = {
  2. username: 'USER',
  3. password: 'PASS'
  4. };
  5.  
  6. const checkIfDeviceExists = await request.get({
  7. url: 'https://apiurl',
  8. auth
  9. });
  10.  
  11. fetch('https://apiurl', {
  12. method: 'get',
  13. headers: {
  14. 'Authorization': 'Basic '+ btoa('USER:PASS') }
  15. });
Add Comment
Please, Sign In to add comment