Why do we need anything more than HTTP GET, PUT, POST?

后端 未结 14 982
-上瘾入骨i
-上瘾入骨i 2021-02-04 10:09

What is the practical benefit of using HTTP GET, PUT, DELETE, POST, HEAD? Why not focus on their behavioral benefits (safety and idempotency), forgetting their names, and use GE

14条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-04 10:42

    GET, PUT, DELETE and POST are holdovers from an era when sophomores thought that a web page could be reduced to a few hoighty-toity principles.

    Nowadays, most web pages are composite entities, which contain some or all of these primitive operations. For instance, a page could have forms for viewing or updating customer information, which perhaps spans a number of tables.

    I usually use $_REQUEST[] in php, not really caring how the information arrived. I would choose to use GET or PUT methods based on efficiency, not the underlying (multiple) paradigms.

提交回复
热议问题