当前位置:网站首页>1-20 预检请求
1-20 预检请求
2022-06-30 21:26:00 【画不完的饼】
预检请求
CORS请求的分类
客户端在请求CORS借口时,根据请求方式和请求头的不同,可以讲CORS的请求分为两大类,分别是:
1. 简单请求
同时满足以下两大条件的请求,就属于简单请求:
(1)请求方式:GET、POST、HEAD三者之一
(2)HTTP头部信息不超过以下几种字段:
无自定义头部字段、Accept、Accept-Language、Content-Language、DPR、Downlink、Save-Data、Viewport-Width、Width、Content-Type(只有三个值application/x-www-form-urlencoded、multipart/form-data、text/plain)
2. 预检请求
只要符合以下任何一个条件的请求,都需要进行预检请求:
- 请求方式为GET、POST、HEAD、之外的请求Method类型
- 请求头中包含自定义头部字段
- 向服务器发送了application/json格式的数据
在浏览器与服务器正式通信之前,浏览器会先发送OPTION请求进行预检,以获知服务器是否允许该实际请求,所以这一次的OPTION请求成为“预检请求”。服务器成功响应预检请求后,才会发送真正的请求,并且携带真实数据。
边栏推荐
- Apply for vector bus protocol color picture wallpaper hanging picture, very good!
- How to run jenkins build, in multiple servers with ssh-key
- 《ClickHouse原理解析与应用实践》读书笔记(3)
- 加密与解密以及OpenSSL的应用
- Electronic scheme development - Intelligent rope skipping scheme
- 两个skyline
- Dm8: generate DM AWR Report
- 给苏丹国安德森苏丹的撒过 d s g
- 多态在代码中的体现
- Testing media cache
猜你喜欢

stacking集成模型预测回归问题
![[untitled]](/img/42/47a8c8faaed33a1d9e864cb2ef7b72.png)
[untitled]

Iclr'22 spotlight | how to measure the amount of information in neural network weights?

Oracle 数据库表结构 Excel 导出

Adobe-Photoshop(PS)-脚本开发-去除文件臃肿脚本

开发技术-使用easyexcel导入文件(简单示例)

雷达数据处理技术

Spatiotemporal data mining: an overview

Why have the intelligent investment advisory products collectively taken off the shelves of banks become "chicken ribs"?

3Ds Max 精模obj模型导入ArcGIS Pro (二)要点补充
随机推荐
个人开发的渗透测试工具Satania
科研中遇到迷茫困惑如何向前一步?如何在科研中发挥女性优势?
[original] unable to use the code dialog height and width to solve the screen problem
凤凰架构——架构师的视角
Internet of things botnet gafgyt family and backdoor vulnerability exploitation of Internet of things devices
Digital currency: far-reaching innovation
clickhouse原生监控项,系统表描述
Sqlserver string type converted to decimal or integer type
对多态的理解
To the Sultanate of Anderson
Learning summary
“信任机器”为发展赋能
Analysis and proposal on the "sour Fox" vulnerability attack weapon platform of the US National Security Agency
vim 常用快捷键
Encryption and decryption and the application of OpenSSL
DM8:生成DM AWR报告
Et la dégradation du modèle de génération de texte? Simctg vous donne la réponse
防范未授权访问攻击的十项安全措施
Three techniques for reducing debugging time of embedded software
Four Misunderstandings of Internet Marketing