Did my demo the other day and this has been stuck in my mind since; one of the questions we were asked was “why did you choose get over post”, posed seemingly as a trick question. I said that since we are expecting a result from the station server, we are “getting” some data in the response which we need to use / display, whereas if we were just sending data without expecting a result then post would be more suited. But then the evaluator said that “actually they are identical and there’s no difference between them at all” and then wrote something down, I assume about my answer.
I thought this was very strange so I looked into it and my intuition was correct;
> GET is for fetching data, appending parameters in the URL, ideal for searches. POST, used for updates, sends data securely in the request body, perfect for forms.
> Besides this, these two methods differ from each other in terms of parameters such as data transmission, data size, data type, security, idempotency, and use cases.
So they aren’t actually identical and there are times when it is possible to use one over the other correctly.
I’m mainly sharing all of this to clarify whether we will lose marks based on not saying that these are identical, as I’m fairly sure that what I answered with was spot on, but given the response from the evalator I feel as if we may lose marks from my answer to this question.
Also I am putting this on here just in case somebody else had a similar experience and was also wondering the same thing as me. Am I alone in this experience? I remember leaving the room extremely confused and I guess the only way to “get” (😃) a solid answer on this topic is to ask here.