AJAX---HTTP協議請求報文與響應文字結構
阿新 • • 發佈:2021-10-08
HTTP
HTTP(hypertexttransportprotocol)協議『超文字傳輸協議』,協議詳細規定了瀏覽器和全球資訊網伺服器之間互相通訊的規則。
約定,規則
請求報文 ※重點是格式與引數 行POST /s?ie=utf-8HTTP/1.1 頭Host:atguigu.com Cookie:name=guigu Content-type:application/x-www-form-urlencoded User-Agent:chrome83 空行 體username=admin&password=admin
響應報文 行HTTP/1.1200OK 頭Content-Type:text/html;charset=utf-8 Content-length:2048 Content-encoding:gzip 空行 體<html> <head> </head> <body> <h1>尚矽谷</h1> </body> </html> 其他響應碼 404 403 401 500 200