-
Notifications
You must be signed in to change notification settings - Fork 0
html
wzs edited this page Aug 27, 2018
·
1 revision
query params
通常, url? 后是query/parmas的内容, body里的内容一般以data/from表示
Content-Type: Content-Type 属性指定请求和响应的HTTP内容类型, 常见类型如下
- text/html
- text/plain
- text/css
- text/javascript
- application/x-www-form-urlencoded
- multipart/form-data
- application/json
- application/xml
- ...
表单提交类型, 后台可以从 from中提取内容.
后台获取的 raw body 是 name=homeway&key=nokey
当文件太长, HTTP 无法在一个包之内发送完毕, 就需要分割数据, 分割成一个一个 chunk 发送给服务端, 这时就是 multipart/form-data 的类型
- 由浏览器解释html, 执行js, 渲染页面. 其他只是将url指向的html下载下来(想想当时的爬虫)
- window 全局对象, 可以将值挂载到这里, 然后其他都可以读取