http - Save query result from GET method for future reference -
I want to apply a query to my web page that gets results from another web service and lets users For this, I send the request as a GET method from the curriculum web page. Server Side, I process the request, I get the results of that web service and return them back to the user.
However, I want to save the results for the future in the future, like the history of the questions, for that I will store the results in a database.
Now, the question is, when I create a query, then increasing my database every time, should I use the post method on the web page or do GET? Does the HTTP explicitly say anything to this scenario?
HTTP does not say that you have to use the post - - If you send your data to the Curiosity The technique will work fine.
But the current conference says that you should use the post, especially if API services are used under an undoubtedly model, if you also have data (on the query parameter) ), Who is making a new record, then post it to the post verb Yoga should. It should update PUT to use.
This is going to be expected according to your audience's expectations. If this is just an internal resource, then go with GET if you expect it to open as a public service, then use the post.
Comments
Post a Comment