Can we not implement the HTTP protocol using just a request body and a response body?
For example, the URL will contain request, which will be mapped to a function depending on programming language on server side say a Servlet and in response HTML and JavaScript response will be sent across.
Is implementing variousWhy does HTTP protocol have notion of methods really needed?
From the answers, I get some sense of why concept of methods is there..This leads to another related question:
For example in gmail compose link, the PUT/POST request and data will be sent. How does the browser come to know which method to use? Does the gmail page sent by server include the method name to use when calling gmail compose request? when we call www.gmail.com , it must be using GET method, how does the browser know that this method to use?
PS : I don't have enough credits to comment on answers, so I am not able to comment on many questions raised by people related to intention behind this question.
As some answers tell, we can create new users on DELETE method, then this raises question the intention behind notion of methods in http protocol, because at the end of the day, it totally depends on servers what function they want to map an URL to. Why should client tell servers what methods to use for an URL.