Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

69
Views
knowing whether a fetch is requesting or responding

I have a long-running fetch process that posts a large file upload and waits for it to return a different large file :

let formData = new FormData();
formData.append('file', new Blob([file.blob], {type: file.type}), file.name);
fetch(someurl, {
  method: 'POST',
  body: formData
  cache: 'no-store'
}).then(response => {
  if (!respone.ok) throw(respone.statusText);
  return response;
}).then(response => response.blob())
.then(blob => {
... do something

Can I know what part of the process the fetch is up to - Posting the Request or Recieving the Response?

https://fetch.spec.whatwg.org/#fetch-elsewhere-fetch says fetch (js) could implement a processRequestEndOfBody and processResponseEndOfBody but the js implementation (https://fetch.spec.whatwg.org/#dom-global-fetch) doesn't seem to have them. However the chrome network inspector seems to have some clue as to the state of the request/response and I'm wondering if there's a way to glean that information at runtime? Any thoughts/discussion/alternates appreciated.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!