title: Next.js - axios/fetch requests pending when sending body with long content
body: <p>I am trying to send a POST request with body that contains one key with file base64 content.</p>
  <p>The problem is that I never get a response. When I check the &quot;Network&quot; tab in Dev Tools, I see that the request is stuck on &quot;pending&quot;. When I console.log the variable that contains the base64, I see that it's just 256kb. It happens both with fetch or axios.</p>
  <p>This is how I sent the request:</p>
  <pre><code>const response = await axios.post(
     &quot;/api/newroute&quot;,
     {
       fileName,
       fileBase64
     },
     {
       //   maxContentLength: Infinity, // Tried that
       //   maxBodyLength: Infinity, // Tried that
     }
  );
  console.log(response); // never happens
  </code></pre>
  <p>I am not sure whether it is a backend issue or a frontend one (this is a route from next.js).
  I also tried to send it as FormData but that didn't help.</p>
  <p>Do you have any idea what could have caused this?</p>