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

125
Views
How to access PUT/POST/DELETE endpoints on browser directly from backend without UI connectivity

How to use PUT/POST/DELETE methods in NodeJS directly in browser?

router.put('/sync/:syncId', (req, res) => {
    res.send(JSON.stringify({ "status": 200, "error": false, "response": "HELLO WORLD" }));
});

This is how I access the endpoint in the browser and Postman:

http://localhost:4600/v1/fetchprojdetails/delete/1

When I use the above code on browser, then the router kind of acts weird and doesn't work. It neither shows res.send() statement nor any console.log() statements if there are any in the above function but when I try the same thing on Postman using the respective HTTP method(PUT/POST/DELETE) then it works as it should. The same thing works when I change the above code and replace router.delete() with router.get().

Can someone please explain to me why this behavior is seen on browser and POSTMAN. Is it so that the browser can't directly understand PUT/POST and DELETE methods?

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

0

Postman is a tool designed to make custom HTTP requests so developers can test APIs. Browsers are tools designed to display webpages and run web applications embedded in them.

If you shove a URL into the browser's address bar then it will make a GET request. The address bar is a UI that affords getting a webpage and displaying it to the user.

If you want to make a POST request then you need to load an HTML document containing either a <form ... method="POST"> or JavaScript that makes an Ajax request.

If you want to use any other verb then you must use an Ajax request.

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!