Skip to content

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

Open

Description

@dxmy2

环境信息

  • 系统: 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": "未登录,请登录后再操作!"
}

Activity

  1. TommyLemon commented on Dec 3, 2020

    @TommyLemon
    Member

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions