Advertisement
Guest User

Untitled

a guest
Feb 2nd, 2016
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. Valid request get proper response
  2. fetch('http://128.199.223.234/api/oauth/access_token?grant_type=password&client_id=WorldKoins&client_secret=qCx3whT4t8ufR8B8CVYC7OU1qyA5Q0VP4GXKayN8&username=admin@email.com&password=123456',{method: 'POST'}).then(function(response) { console.log(response) }).catch(function(err) { console.log(err)});
  3.  
  4. Response for valid request
  5. body: (...)
  6. bodyUsed: false
  7. headers: Headers
  8. ok: true
  9. status: 200
  10. statusText: "OK"
  11. type: "cors"
  12. url: "http://128.199.223.234/api/oauth/access_token?grant_type=password&client_id=WorldKoins&client_secret=qCx3whT4t8ufR8B8CVYC7OU1qyA5Q0VP4GXKayN8&username=admin@email.com&password=123456"
  13.  
  14.  
  15. Invalid request get proper response
  16. fetch('http://128.199.223.234/api/oauth/access_token?grant_type=password&client_id=WorldKoins&client_secret=qCx3whT4t8ufR8B8CVYC7OU1qyA5Q0VP4GXKayN8&username=admin@email.com&password=12345s6',{method: 'POST'}).then(function(response) { console.log(response) }).catch(function(err) { console.log(err)});
  17.  
  18. Response for invalid request
  19. body: (...)
  20. bodyUsed: false
  21. headers: Headers
  22. ok: false
  23. status: 500
  24. statusText: "InvalidCredentialsException:The user credentials were incorrect."
  25. type: "cors"
  26. url: "http://128.199.223.234/api/oauth/access_token?grant_type=password&client_id=WorldKoins&client_secret=qCx3whT4t8ufR8B8CVYC7OU1qyA5Q0VP4GXKayN8&username=admin@email.com&password=12345s6"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement