-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP #25
Comments
参考资料
关于HTTP methodhttp://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html |
GETGET 可带请求体?
<form method="GET"> GET提交表单,会将值encode在url中,也就是query string . 也就是说GET没有请求体,能带query string ? |
POST |
HEAD
HEAD同GET一样,HEAD请求Server不会返回请求体body,发送的header应该与GET请求此url时相同. 此方法可用于url所代表的 entity信息,常用于 测试链接可用性、最近修改等。
此方法的响应是可缓存的。 |
OPTIONS
OPTIONS 请求的是 一个url所available的communicate options,说白了就是一个url允许你用什么方法去请求. OPTIONS方法允许客户端(如浏览器)决定一个resource的requirements or/and options , 同时不去请求这个resource 内容.
|
put
如果不能create/modify server上的版本,应返回对应的 error. |
DELETE
一堆规则
|
enctype when post
格式就是 |
express 中对于 head 和 options 的特殊处理 headoptionsmethod 为options, 会贯穿整个router, 找出所有可以 handle 当前path 的 http method 会拦截 done, 发送的body为文本, 与 Allow 一样 |
cacherequest header
cache-controlhttps://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control
response headers
|
connectionconnection 头列出的 headers 表示这次连接使用的信息
必须解析HTTP 1.1 的
在server端得到 |
|
vary简单来说用于 缓存server 判断一个请求是否是 fresh, 如果写上 对于常见的 |
chunkedhttps://www.httpwatch.com/httpgallery/chunked/ http2http2 可以省略 em...冇事不是省略, 是机制变了 |
All about HTTP & HTTP in node.js
The text was updated successfully, but these errors were encountered: