async axios call

JavaScript
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);
    }
}


Source

Also in JavaScript: