title: How to use method getInitialProps from next.js to get cookies?
body: <p>I'm facing an issue with next.js </p>
  
  <p>I cannot get my cookies when i make a request from <code>async static getInitialProps</code>. i get <code>undefined</code></p>
  
  <p>However when i am making it in <code>componentWillMount</code> there is no problem. Unfortunately, it's too late because i need to get the cookie info before the component be called. So i need to get it in <code>getInitialProps</code></p>
  
  <p>Here what i've already tried without success :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>static async getInitialProps () {
        const res = await axios.get('http://mybackend/getCookie');
        return {data : res.data}
      }
      
      //res.data = undefined</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any suggestion ?</p>