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
grant_type=password
&scope=myapp:read myapp:write
&client_id=myapp-test-client
&client_secret={{clientSecret}}
&username={{username}}
&password={{password}}
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.
Thanks
Developer technologies Visual Studio Other
5,451 questions
Sign in to answer