title: Make requests in getStaticProps
body: <p>I am trying to do a simple fetch of pages from my Wordpress installation in my getStaticProps method:</p>
  <pre><code>export async function getStaticProps(context) {
    // get pages!
    const response = await fetch(&quot;http://localhost:8000/wp-json/wp/v2/pages&quot;);
  
    return {
      props: {
      }, // will be passed to the page component as props
    }
  }
  </code></pre>
  <p>When calling that I get:</p>
  <p><strong>FetchError: request to http://localhost:8000/wp-json/wp/v2/pages failed, reason: connect ECONNREFUSED 127.0.0.1:8000</strong></p>
  <p>So reading the docs a little bit, I know you aren't supposed to make API calls in getStaticProps. However in my case, this is the Wordpress API, not the NextJS API, which I think is what that documentation addresses.</p>
  <p>I am able to access my API otherwise just fine. Its like in whatever context calls 'getStaticProps', local host does not exist?</p>
  <p>Looking at the wordpress/nextjs example where some API requests are called right within the getStaticProps, the only difference I can see is usage of a GraphQL plugin. I'm assuming that is handling some logic I am overlooking, but I am unsure.
  <a href="https://github.com/vercel/next.js/tree/canary/examples/cms-wordpress" rel="nofollow noreferrer">https://github.com/vercel/next.js/tree/canary/examples/cms-wordpress</a></p>
  <p>Thank you for any help in advance!
  Joe</p>