- Hands-On Full:Stack Web Development with ASP.NET Core
- Tamir Dresher Amir Zuker Shay Friedman
- 303字
- 2021-06-10 19:37:15
Hypertext Transfer Protocol
Hypertext Transfer Protocol (HTTP) is the foundation of communication on the WWW. It defines the format of messages and the way they are transmitted between the client and the server.
HTTP has two sides to communication — the client and the server. On web applications, the client is the user's web browser and the server is the backend server. Communication happens when the client creates a message called an HTTP request, sends it to the server, and the server, in turn, responds with an HTTP response, as shown in the following diagram:
Each HTTP request consists of a few pieces of information:
- URI: The web address or IP address that identifies the server. For example, http://example.com or http://192.168.0.1.
- Method: The action that should be taken upon the requested resource. For example, GET indicates data retrieval and POST indicates data creation.
- Body: Contains the data to be sent to the server, if any. The most popular data format for HTTP requests is JSON but, generally, data can be formatted in any format that the server understands.
- Headers: An optional set of metadata key-value pairs that add information to a request.
The server retrieves this request, executes related logical steps (commonly known as business logic), and forms an HTTP response to be sent back to the client. This response includes a few details:
- Status code: A three-digit integer that describes the result of the request. For example, 200 means OK, 500 means there was an error in the server, and 404 means the requested resource was not found.
- Body: The data sent back from the server, if any. As with the request body, JSON is the common data format, but any other format is valid as well.
- Headers: An optional set of metadata key-value pairs that add information about the response.
- 物聯(lián)網(wǎng)(IoT)基礎(chǔ):網(wǎng)絡(luò)技術(shù)+協(xié)議+用例
- 物聯(lián)網(wǎng)網(wǎng)絡(luò)安全及應(yīng)用
- 社交電商運(yùn)營(yíng)策略、技巧與實(shí)操
- 萬(wàn)物互聯(lián):蜂窩物聯(lián)網(wǎng)組網(wǎng)技術(shù)詳解
- Oracle SOA Suite 11g Performance Tuning Cookbook
- 計(jì)算機(jī)網(wǎng)絡(luò)安全實(shí)訓(xùn)教程(第二版)
- Getting Started with WebRTC
- PLC、現(xiàn)場(chǎng)總線及工業(yè)網(wǎng)絡(luò)實(shí)用技術(shù)速成
- Socket.IO Real-time Web Application Development
- Practical Web Design
- 城市治理一網(wǎng)統(tǒng)管
- Building RESTful Web services with Go
- jQuery Mobile Web Development Essentials
- 物聯(lián)網(wǎng)與智能家居
- 物聯(lián)網(wǎng)場(chǎng)景設(shè)計(jì)與開(kāi)發(fā)(初級(jí))