- Python API Development Fundamentals
- Jack Chan Ray Chung Jack Huang
- 212字
- 2021-06-11 12:56:23
HTTP Protocol
To better understand what REST is and make sure we are implementing the REST style, we can simply talk about the HTTP protocol. HTTP is an implementation of the REST architecture style. It is short for HyperText Transfer Protocol and is the standard protocol used on the worldwide web. We use it every day to browse different websites. That's why all the websites we visit are prefixed with http.
In the HTTP protocol, there are different types of service request methods. Each service request method has a special definition that is specific to it. When the frontend interface interacts with the backend API through a URL, they need to, at the same time, define the HTTP method for this request. Different HTTP methods are like different service counters. For example, reading and creating data are completely different services, so they should be handled by different service counters, meaning different HTTP methods.
- GET: For reading data
- POST: For creating data
- PUT: For updating data by completely replacing data with new content
- PATCH: For updating data, but by partially modifying a few attributes
- DELETE: For deleting data
Simply put, different HTTP methods are like the verbs for REST API. They are used for performing different actions on the same set of data.
- 黑客攻防實戰技術完全手冊:掃描、嗅探、入侵與防御
- 6G潛在關鍵技術(下冊)
- 物聯網之魂:物聯網協議與物聯網操作系統
- Oracle SOA Suite 11g Performance Tuning Cookbook
- 局域網組建、管理與維護項目教程(Windows Server 2003)
- 互聯網安全的40個智慧洞見:2014年中國互聯網安全大會文集
- 物聯網與無線傳感器網絡
- 雷達饋線技術
- 圖解手機元器件維修技巧
- Building Web Applications with ArcGIS
- Working with Legacy Systems
- Getting Started with Memcached
- Practical Web Penetration Testing
- 工業以太網技術:AFDX/TTE網絡原理、接口、互連與安全
- 物聯網M2M開發技術:基于無線CPU-Q26XX