user43286
user43286

Reputation: 2321

How do I specify Http method POST in URI itself?

I don't want to use curl, postman, jquery, etc to specify the http method. If I simply put the URL in the browser address bar, it should make a POST request, not GET. Is it possible?

Upvotes: 0

Views: 4260

Answers (1)

Derlin
Derlin

Reputation: 9891

No, it is not possible. As stated by @bereal, the method is not part of the url.

Some workarounds:

  • create a simple html page with a <form method="POST"> that you open locally;
  • use the "Cross-Browser Solution" proposed in this thread;
  • curl or postman are so easy to use, they are worth it;
  • if you are developing the API, add a queryParameter like method=POST to override the GET request.

Upvotes: 1

Related Questions