Visual studio code REST客户端VS代码扩展POST与应用程序/json不兼容';我认不出身体

Visual studio code REST客户端VS代码扩展POST与应用程序/json不兼容';我认不出身体,visual-studio-code,rest-client,Visual Studio Code,Rest Client,这个标题不言自明。我在休息Client@0.23.2由华超毛(Visual Studio代码扩展)和一个POST请求不承认我通过的正文 { "error": "invalid_request", "error_description": "Missing grant type" } 顺便说一下,后端是带有OAuth2的spring引导 客户休息 ### POST http://localhost:8082/oauth/token HTTP/1.1 Content-Type: appli

这个标题不言自明。我在休息Client@0.23.2由华超毛(Visual Studio代码扩展)和一个POST请求不承认我通过的正文

{
  "error": "invalid_request",
  "error_description": "Missing grant type"
}
顺便说一下,后端是带有OAuth2的spring引导

客户休息

###
POST http://localhost:8082/oauth/token HTTP/1.1
Content-Type: application/json
Authorization: Basic trusted:secret

{
    "grant_type": "password",
    "username": "admin",
    "password": "123456"
}
返回以下错误。这意味着它无法识别我传递的参数

{
  "error": "invalid_request",
  "error_description": "Missing grant type"
}
而下面的请求可以正常工作

###
POST http://localhost:8082/oauth/token HTTP/1.1
Content-Type: application/x-www-form-urlencoded
Authorization: Basic trusted:secret

grant_type=password
&username=admin
&password=123456
怎么了?我在他们的文档中看到了,但我没有发现我的和他们的有什么不同