0

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?

user43286
  • 2,001
  • 2
  • 23
  • 38
  • No, it's not, since method is not a part of URL. You could however try and find some browser extension, I would be surprised if there were not a few. – bereal Aug 11 '16 at 05:57
  • Another option for consideration - Swagger (http://swagger.io). It can generate interactive html documentation page based on your annotated methods in a code. It automatically detects HTTP methods and method parameters. – Justinas Jakavonis Aug 11 '16 at 06:28

1 Answers1

1

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.
Community
  • 1
  • 1
Derlin
  • 8,518
  • 2
  • 22
  • 42