Andywo's recent timeline updates
Andywo

Andywo

V2EX member #608031, joined on 2022-12-27 10:28:13 +08:00
Andywo's recent replies
Feb 18, 2025
Replied to a topic by lmshl 生活 🎉小棉袄出生, 生殖隔离已打破
恭喜恭喜
小说的意境和电视剧演出来的是两个剧本好不
May 22, 2023
Replied to a topic by Andywo 分享创造 爱宝助手-安全期计算器微信小程序
@nitmali 中年人就这点自由的了
@NoOneNoBody 避孕的对立面就是备孕 安全期这个似乎是小程序搜索热门词
我 2022 年再问类似的问题,会被你们打死么?

在跨域的情况下,用同一接口测试了下

form 格式请求,能正常拿到 token 及后面的数据
```
fetch("http://fast.com/api/test", {
method:'POST',
headers:{
"Content-Type":"application/x-www-form-urlencoded"
},
body:"token=489b4f53-fbd0-43a3-a453-e39f3539f33b",

})
.then(response => response.json())
.then(result => console.log(result))
```
而 post 请求就不正常了,拿不到 token
```
fetch("http://fast.com/api/test", {
method:"POST",
headers:{
"Content-Type":"application/json"
},
body:JSON.stringify({
"token":"489b4f53-fbd0-43a3-a453-e39f3539f33b"
})

})
.then(response => response.json())
.then(result => console.log(result))
```
我是在 localhost 下另外一个端口发请求的,排除不是跨域的问题,调试断点进去发现$_POST 都是空的,难道我要看下框架源码?
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   875 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 13ms · UTC 22:29 · PVG 06:29 · LAX 15:29 · JFK 18:29
♥ Do have faith in what you're doing.