- Go Web Scraping Quick Start Guide
- Vincent Smith
- 211字
- 2021-07-02 13:58:17
HTTP request methods
There are nine current HTTP request methods, which define a general action desired by the client. Each method carries a particular connotation as to how the server should process the request. The nine request methods are as follows:
- GET
- POST
- PUT
- DELETE
- HEAD
- CONNECT
- TRACE
- OPTIONS
- PATCH
The most common request methods that you will need are GET, POST, and PUT. GET requests are used for retrieving information from a website. POST and PUT requests are for sending information, such as user login data, to a website. These types of requests are usually sent only when submitting some type of form data, which we will cover in later chapters in this book.
In building a web scraper, the vast majority of the time you will be sending HTTP GET requests to a server in order to get a web page. The simplest example of a GET request for http://example.com/index.html looks something like this:
GET /index.html HTTP/1.1
Host: example.com
The client sends this message to the server with the GET action to obtain the index.html resource using the 1.1 Version of the HTTP protocol. This first line of an HTTP request is called the request line and is the core of an HTTP request.
- Web安全防護(hù)指南:基礎(chǔ)篇
- Building E-commerce Sites with VirtueMart Cookbook
- 從區(qū)塊鏈到Web3:構(gòu)建未來(lái)互聯(lián)網(wǎng)生態(tài)
- 無(wú)人機(jī)通信
- 信息通信網(wǎng)絡(luò)建設(shè)安全管理概要2
- 物聯(lián)網(wǎng)與無(wú)線傳感器網(wǎng)絡(luò)
- 搶占下一個(gè)智能風(fēng)口:移動(dòng)物聯(lián)網(wǎng)
- 網(wǎng)絡(luò)環(huán)境中基于用戶視角的信息質(zhì)量評(píng)價(jià)研究
- Learning Windows 8 Game Development
- 從實(shí)踐中學(xué)習(xí)手機(jī)抓包與數(shù)據(jù)分析
- 異構(gòu)蜂窩網(wǎng)絡(luò)關(guān)鍵理論與技術(shù)
- 沖擊:5G如何改變世界
- 中國(guó)互聯(lián)網(wǎng)發(fā)展報(bào)告2021
- 圖解物聯(lián)網(wǎng)
- Cisco無(wú)線局域網(wǎng)配置基礎(chǔ)