Skip to content

Instantly share code, notes, and snippets.

@5minpause
Created May 9, 2016 13:12
Show Gist options
  • Save 5minpause/fecd7f9e7335d5db268ecf9f504a731e to your computer and use it in GitHub Desktop.
Save 5minpause/fecd7f9e7335d5db268ecf9f504a731e to your computer and use it in GitHub Desktop.
var jwt = JwtStore.jwt();
var otp = JwtStore.otp();
$.ajax({
url: '/api/v1/affiliates',
headers: {
'Authorization': 'Bearer ' + jwt,
'Otp': otp,
'Accept': 'application/json',
'Content-Type': 'application/json'
},
method: 'GET',
dataType: 'json',
success: function (data) {
console.log(data);
},
error: function (xhr, status, err) {
console.error(xhr, status, err.toString());
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment