Skip to content
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

boot项目运行后,无法进行post接口的测试 #166

Open
dxmy2 opened this issue Dec 2, 2020 · 1 comment
Open

boot项目运行后,无法进行post接口的测试 #166

dxmy2 opened this issue Dec 2, 2020 · 1 comment
Labels

Comments

@dxmy2
Copy link

dxmy2 commented Dec 2, 2020

环境信息

  • 系统: Windows 10
  • JDK: 1.8.0_271
  • 数据库: MySQL 8.0.21
  • APIJSON: 2.9.1

问题描述

http://apijson.org/auto/上进行测试时,先调用http://localhost:8080/login进行登录,登录信息为
{
"phone": "13000038710",
"password": "666666"
}
登录是成功的,之后切换为http://localhost:8080/post,新增信息为
{
"Moment": {
"content": "This is My_Test !",
"userId": 38710
},
"tag": "Moment"
}
会报错,报错信息为下,想问下原因以及解决办法。
错误信息
{
"Moment": {
"content": "This is My_Test !" ,
"userId": 38710
},
"tag": "Moment" ,
"ok": false ,
"code": 407 ,
"msg": "未登录,请登录后再操作!"
}

@TommyLemon
Copy link
Collaborator

TommyLemon commented Dec 3, 2020

Chrome 80+ 强制 same-site Cookie 的策略导致,解决方法见
TommyLemon/APIAuto#9

如果都不行,可以改用 Postman 等其它接口测试工具

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants