Similar function to fetch() in node
<p>I used to collect my data in the front-end by using fetch(), now I'm doing the same in my back-end (using node.js) but that threw an error</p>

<blockquote>
  <p>UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: only absolute urls are supported</p>
</blockquote>

<p>That's because I'm fetching my Express route <code>fetch(`/api/users/${userstate.username}`)</code></p>

<p>Is there a function in node that returns the same like fetch?</p>