SHARE
TWEET

Untitled

a guest Oct 23rd, 2017 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. POST /oauth/token HTTP/1.1
  2. Host: localhost:8080
  3. Authorization: Basic YXBwbGljYXRpb246c2VjcmV0
  4. Content-Type: application/x-www-form-urlencoded
  5. Cache-Control: no-cache
  6. Postman-Token: 9f9582e9-fe73-499f-d7f7-82498a974e39
  7.  
  8. grant_type=password&username=pedroetb&password=password
  9.    
  10. let headers = new Headers();
  11.     headers.append('Content-Type', 'application/x-www-form-urlencoded');
  12.     headers.append("Authorization","Basic YXBwbGljYXRpb246c2VjcmV0");
  13.  
  14.     var obtainTokenUrl = 'http://localhost:8080/oauth/token';
  15.  
  16.     this._http.post(obtainTokenUrl + "?grant_type=password&username=pedroetb&password=password", null, {headers: headers}).subscribe(response => {
  17.       console.log(response);
  18.     });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top