Home > Mobile >  Why can't we use POST instead of GET to fetch data?
Why can't we use POST instead of GET to fetch data?

Time:12-08

Why can't we use the Post verb to fetch data from the server instead of the Get verb?

  1. Through Post method we can send the parameters in the body to fetch data
  2. Through Get method we will send the parameters in the url which is limited also

So why use Get to fetch data instead of Post

CodePudding user response:

You can do lot of stuff which isn't intended. But i think the best reason is that its all about the standard of an restful Service.

i.e: https://restfulapi.net/http-methods/

CodePudding user response:

Technically you can use POST to fetch data. Many POST requests do return data although they're usually doing something more than fetching.

One factor to consider is that GET requests can be cached, but POST requests are never cached. Some data doesn't change frequently. Some changes rarely.

Requests can be cached in various ways - by the browser, by the server, and by CDNs. All of these result in faster response times and reduced load on the server

  • Related