Guest User

Untitled

a guest
Jan 10th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. $.get('url', {
  2. username: 'Luiz'
  3. password: 'Pass'
  4. })
  5. .done(function () {
  6. console.log('Enviado!');
  7. })
  8. .fail(function () {
  9. console.log('Erro no envio.');
  10. })
  11. ;
  12.  
  13. $.ajax({
  14. url: "http://meuapp.com/jwt",
  15. dataType: 'jsonp',
  16. success: function(data, status) {
  17. return console.log("Dados", data);
  18. },
  19. beforeSend: function(xhr, settings) { xhr.setRequestHeader('Authorization','Bearer ' + token); }
  20. });
Add Comment
Please, Sign In to add comment