HTTP的GET METHOD
因為常要測試網頁有沒有正常送出資料,所以得用原始的get方法(或post, header等方法)
以下範例取得 index.php?f=123
# telnet 211.75.194.243 80 <== 使用Telnet叫用
Trying 211.75.194.243...
Connected to 211.75.194.243.
Escape character is '^]'.
GET /index.php?f=123 HTTP/1.1
Host: n.sfs.tw
User-Agent: YaleCell/1.1 (Test20210210)
<<連按2下ENTER>>
伺服器的回應範例:
HTTP/1.1 200 OK
Date: Wed, 10 Feb 2021 13:40:01 GMT
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.0.33
X-Powered-By: PHP/7.0.33
Set-Cookie: ci_sesssion=bdbce8a737bcf6fead598; path=/; HttpOnly
Cache-Control: max-age=0, no-cache, no-store, must-revalidate
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Vary: Accept-Encoding
Pragma: no-cache
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8
如果是post方法的話,參數另外加上去
Host: n.sfs.tw
User-Agent: YaleCell/1.1 (Test20210210)
p1=value1&p2=value2
輸入手速要快,否則會出現 408 Request Timeout 的錯誤
相關連結
https://www.w3schools.com/tags/ref_httpmethods.asp
[Rocky9] 安裝node.js 18, node.js 20
原本的nodejs16在使用 quasar dev時出現錯誤,得升級成18版以上
[SSL] Could not read certificate from server.cer 的錯誤排除
在轉換ssl憑證時,出現無法讀取的錯誤,可是怎麼看憑證都很正常,該怎麼解決?
[Linux] 如何能知道我是什麼時候安裝系統的?
linux想知道什麼時候裝系統的? 不必憑記憶。
地圖填色的網站
我們想為國家填色不需要小畫家,這個網站能幫助你
[Linux] 列出所有目錄及所占空間的方法
想知道目錄下的所有目錄所占的空間大小?
[Linux] grep 排除特定字串
使用 -v 參數可以讓grep排除特定字串的方法