title: Ideal way to chain asynchronous calls with axios
body: <p>I would like to make an API call with axios based on the response of an initial API call - is this possible with asynchronous functions?</p>
  
  <p>I have tried something along the following lines with await/promise:</p>
  
  <pre><code>function get_user(value){
    return axios.get( "https://apicall/" + value )
  }
  
  function get_user_posts(username){
    return axios.get("https://apicall/" + username)
  }
  
  var UsersOutput = async function () {
    const userProfile = await get_user(2928928);
    const userPosts = await get_user_posts(userProfile.data.username);
    return { userProfile, userPosts }
  }
  </code></pre>
  
  <p>But this appears to return nothing, from either calls. Any pointers appreciated.</p>