title: Axios 2 post requests - use response of first post in second request?
body: <p>With Axios I am trying to: </p>
  
  <ol>
  <li><p>a post request that has a successful response (or that has error, return error)</p></li>
  <li><p>if first request sucessful, use a returned value in the response, and post to second request to different endpoint</p></li>
  </ol>
  
  <p>Nearest thing I had was:</p>
  
  <pre><code>import axios from 'axios';
  
  let one = "https://api.storyblok.com/v1/cdn/stories/health?version=published&amp;token=wANpEQEsMYGOwLxwXQ76Ggtt"
  let two = "https://api.storyblok.com/v1/cdn/datasources/?token=wANpEQEsMYGOwLxwXQ76Ggtt"
  let three = "https://api.storyblok.com/v1/cdn/stories/vue?version=published&amp;token=wANpEQEsMYGOwLxwXQ76Ggtt"
  
  const requestOne = axios.get(one);
  const requestTwo = axios.get(two);
  const requestThree = axios.get(three);
  
  axios.all([requestOne, requestTwo, requestThree]).then(axios.spread((...responses) =&gt; {
    const responseOne = responses[0]
    const responseTwo = responses[1]
    const responesThree = responses[2]
    // use/access the results 
  })).catch(errors =&gt; {
    // react on errors.
  })
  </code></pre>
  
  <p>But this does calls at once, so I can't pass value to second post, if that makes sense?</p>