I know that there are some differences between GET
and POST
, like descriped in this post on StackOverflow. But what I cannot figure out is, are they interchangable, assuming that you change your code accordingly?
For instance, could you use POST
to request HTML-content and display it in the browser? I am not concerned with whether or not this is best practice, only if it is possible.
Update
I should point out, that POST
and GET
are two different ways of sending HTTP requests. I am aware of this and I am aware that it does makes a difference which one you use. Especially when it comes to security, it is important to know the difference.
What I basically wanted to know was, if it was possible (from a technical point of view) to use POST
instead of GET
and vice versa. From the answers in this post, it is clear that this is possible to use either. That does not mean that it doesn't matter which one you use.
Update 2
After much confusion, let me see if I can make this clearer: My understanding is, that all HTTP requests are basically just text strings. Hence the only real difference between GET
and POST
lies in the interpretaion of that text string. If you changed your HTTP server, you could make it handle GET
requests as POST
and vice versa. I am aware that this is a horrible idea, with no real usage, I just wanted to know, if my understanding was correct.