Built-in REST Client with .http files with Content-type: application/x-www-form-urlencoded

Salah 0 Reputation points

Hi guys,

I'm using .https request in VS 2022 v17.10.0 to test my APIs. It's pretty awesome feature, but I didn't find enaught documentation.

Before I can call my API I need to get a token.

POST {{myIdentityServerUrl}}/connect/token HTTP/1.1
Content-type: application/x-www-form-urlencoded

&scope=myapp:read myapp:write

I keep having this error : error 400 Bad Request { "error": "invalid_client" }.

The same call works perfectly from vscode using RestClient extention.

I even replaced the varibales with values, but without aby success.

Is there any documentation or help for this kind of use case.


Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,791 questions
{count} votes