-
-
Notifications
You must be signed in to change notification settings - Fork 11k
-
application.yml:
server: port: 8080 servlet: context-path: /demo
使用 Intellij idea 自动生成的 generated-request.http
,通过POST 请求访问 端点后,返回的 code 为 400 ,如下:
### POST http://localhost:8080/demo/api/auth/login?usernameOrEmailOrPhone=admin&password=123456 <> 2021年07月10日T131209.200.json <> 2021年07月10日T125242.200.json
{ "code": 400, "message": "参数不能为空!", "data": null }
且没有进入 AuthController
的 login
方法的断点。
求问:是什么原因呀?
Beta Was this translation helpful? Give feedback.
All reactions
Answered by
icyfang
Jul 10, 2021
参数放body,而不是param
Replies: 2 comments 1 reply
-
参数放body,而不是param
Beta Was this translation helpful? Give feedback.
All reactions
-
👍 2 -
😄 1
1 reply
-
嗯嗯, 明白了! 谢谢!
Beta Was this translation helpful? Give feedback.
All reactions
Answer selected by
jhnlynn
-
400 错误基本都是参数请求格式错误
Beta Was this translation helpful? Give feedback.
All reactions
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment