Http 请求分为简单请求 和 复杂请求
当浏览器认为是简单请求时则不会发送options请求。反之则会自动发送。
满足以下条件的请求是简单请求:
请求方式:GET、POST、HEAD
请求的header里不能超出以下几种字段:
- Accept
- Accept-Language
- Content-Language
- Last-Event-ID
- Content-Type
Content-Type 的值 只限于以下三种:
- application/x-www-form-urlencoded
- multipart/form-data
- text/plain
网友评论