Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. const getUser = async (token) =>{
  2.     try{
  3.         const authString =`bearer ${token}`
  4.         const config = {
  5.             proxy:{
  6.                 host:'173.44.34.106',
  7.                 port:34276,
  8.             },
  9.             headers:{
  10.                 'Authorization':authString,
  11.             },
  12.         }
  13.         console.log('url',userUrl,'authString',authString)
  14.         const response = await axios.get(userUrl,config)
  15.         return response
  16.     }catch(error){
  17.         return error.message
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement