Skip to content

Instantly share code, notes, and snippets.

@hootlex
Last active January 15, 2016 16:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hootlex/1bd760788ad4b4eee28d to your computer and use it in GitHub Desktop.
Save hootlex/1bd760788ad4b4eee28d to your computer and use it in GitHub Desktop.
jQuery Request to test api
var token = '';


$.ajax({
  method: 'post',
  url: "",
  dataType: 'jsonp',
  data: {
    
  },
  success: function(data, status) {
    return console.log("The returned data", data);
  },
  beforeSend: function(xhr, settings) { xhr.setRequestHeader('Authorization','Bearer ' + token); } 
});

apodeiksi

$.ajax({
  method: 'POST',
  url: "http://apodeiksi.tk/jwt/create",
  dataType: 'jsonp',
  data: {
    'email': 'efkolo@me.com',
     'password': '****'
  },
  success: function(data, status) {
    return console.log("The returned data", data);
  },
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment