talking-web
RFC 1945
RFC 1945 is the Request for Comments: 1945.
This is a document, which defines exactly what is http, and how should it look like, etc.
Request-line
Request-Line = Method
SP Request-URI
SP HTTP-Version
CRLF
example:
1 | GET /greet HTTP/1.0 |
Status-line
Status-Line = HTTP-Version
SP Status-Code
SP Reason-Phrase
CRLF
example:
1 | HTTP/1.0 100 OK |
Methods
Get
URLs and Encoding
URL Encoding
State
RFC said that the HTTP protocal is a stateless protocal, but sometimes we connected to a server and logged in. And then we want the request after that login request to know that we are the one who have logged in as some identity. But the protocal itself is stateless, so we need a thing called HTTP Cookies
.
With the cookies in the HTTP header, the web server could know the status of the client.
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 HaoIne!