Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- POST /oauth/token HTTP/1.1
- Host: localhost:8080
- Authorization: Basic YXBwbGljYXRpb246c2VjcmV0
- Content-Type: application/x-www-form-urlencoded
- Cache-Control: no-cache
- Postman-Token: 9f9582e9-fe73-499f-d7f7-82498a974e39
- grant_type=password&username=pedroetb&password=password
- let headers = new Headers();
- headers.append('Content-Type', 'application/x-www-form-urlencoded');
- headers.append("Authorization","Basic YXBwbGljYXRpb246c2VjcmV0");
- var obtainTokenUrl = 'http://localhost:8080/oauth/token';
- this._http.post(obtainTokenUrl + "?grant_type=password&username=pedroetb&password=password", null, {headers: headers}).subscribe(response => {
- console.log(response);
- });
Add Comment
Please, Sign In to add comment