Skip to main content
Most of the answers led to another question, so included that in original question instead of making another fresh unrelated question.
Source Link

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.

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 various HTTP methods really needed?

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.

Why does HTTP protocol have notion of methods?

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.

Tweeted twitter.com/StackWebmasters/status/1174518901461438465
Became Hot Network Question
Grammar
Source Link
Stephen Ostermiller
  • 99.4k
  • 18
  • 141
  • 364

What is the need of HTTP methods like get,post etcGET and POST in the HTTP protocol?

canCan 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 servletServlet and in response html/java scriptHTML and JavaScript response will be sent across. What is really the need of

Is implementing various HTTP methods really needed?

What is the need of HTTP methods like get,post etc in HTTP protocol?

can we not implement HTTP protocol using just request body and 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/java script response will be sent across. What is really the need of HTTP methods?

What is the need of methods like GET and POST in the HTTP protocol?

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 various HTTP methods really needed?

Source Link
user104656
  • 191
  • 1
  • 3

What is the need of HTTP methods like get,post etc in HTTP protocol?

can we not implement HTTP protocol using just request body and 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/java script response will be sent across. What is really the need of HTTP methods?