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

237
Views
Unable to process same GET request multiple times. How do I get around this?

I'm making a Node.JS app where the user sends commands to a robot. These requests are received from Angular.JS $http.get() requests. This is what the code looks like server side:

app.get('/control/:dir/:amount', function(req, res){
    var dir = req.params.dir.substring(1);
    var amount = req.params.amount.substring(1);
    networking.sendCommand(dir, amount);
});

I know everything is sent properly, but it can only process a certain request once (so no matter how many time localhost:8080/control/forward/100 is sent, it only gets processed once). Is there any way around this?

Edit: The error was fixed by changing app.get() to app.post() and adding a res.sendStatus(200) back to the client.

about 4 years ago · Santiago Trujillo
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!