I had the same issue when using the fetch
function in JavaScript
. To solve it, make sure you call a method that reads the body of the response like json()
or text()
:
// Sends request and loads only headers
fetch('/foo');
// Sends request, loads headers and then fetches the body as JSON
fetch('/foo').then(response => response.json());
In my case response headers were also loaded properly and I had a successful HTTP
status code, but I was missing the body content and I had Caution: request is not finished yet
inside Chrome Developer Tools
.
It is coused by two-step response loading. If you are using some low-level API
, make sure that you fetch not only headers, which arrive first, but also body content that comes later as a stream.