When to make GET vs POST requests

Posted by DisciplineFast3950@reddit | learnprogramming | View on Reddit | 27 comments

I'm wondering if the "intent" of the request matters whether a fetch request should be GET or POST. Obviously if you're sending a json payload it has to be POST but I also heard that POST should be used when the request is intended to modify or change something on the backend/server, and GET should be used when simply fetching data. So if I'm pinging a very simple endpoint for example mysite.com/endpoint which starts a process on my server but doesn't need a json payload the request should still be a POST request?