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

210
Views
How to stop POST request processing in node ? when the client/Postman cancels the request midway?

I have a POST API in Nodejs(Express), The API takes a lot of time to send back response(Heavy data processing).

When I cancel the request midway through Postman or close the page. (The API keeps processing the data in the node server, even though the response will not be collected by client.) How do I stop the internal API processing as well when the request is closed ?(Client stops the API)

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

With express, you can try:

req.connection.on('close',function(){    
  // code to handle connection abort
  console.log('user cancelled');
});
about 4 years ago · Juan Pablo Isaza Report
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!