async axios call
snippet in javascript

async axios call

user9963

async getUserAsync(name) {
    try{
      let response = await axios({
          method: 'get',
          url: `https://api.github.com/users/${name}`,
          json: true
      });
      return response;
    } catch(err){
        console.error(err);
    }
}