Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- url: 'http://localhost:8080/oauth/token',
- type: 'POST',
- dataType: 'json',
- contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
- beforeSend: function (xhr) {
- xhr.setRequestHeader('Authorization', makeBaseAuth('foo', 'bar'));
- },
- data: {
- grant_type: 'password',
- username: 'test@gmail.com',
- password: '1'
- },
- complete: function(result) {
- console.log('complete', result);
- },
- success: function(result) {
- console.log('success', result);
- },
- error: function(result) {
- console.log('error', result);
- }
- });
Add Comment
Please, Sign In to add comment