DEV Community

Suresh Vytla
Suresh Vytla

Posted on

How to read external post request in vuejs?

Hi,

I've use case to implement identity-broker for the web-clients to authorize and obtain access token. This requires to read external POST request in vuejs and return JSON response.

Example

Request

Endpoint - /oauth/token
Method - POST
Form Data
grant_type=authorization_code
&code=xxxxx
&client_id=xxxx
&redirect_uri=xxxxx
&code_verifier=xxxx

Response

{"access_token":"xxxxx","id_token":"xxxxx","refresh_token":"xxxxx","token_type":"Bearer"}

Thanks in advance.

Top comments (0)