Skip to content

Instantly share code, notes, and snippets.

@kosso
Created December 8, 2012 06:08
Show Gist options
  • Save kosso/4238883 to your computer and use it in GitHub Desktop.
Save kosso/4238883 to your computer and use it in GitHub Desktop.
$.ajax({
beforeSend: function (req){
req.setRequestHeader("Authorization: Bearer", access_token);
req.setRequestHeader("Content-Type","application/x-www-form-urlencoded");
},
type: "POST",
url: "https://alpha.app.net/oauth/access_token",
dataType:"json",
data:"grant_type=delegate&delegate_client_id=THECrAzYAppLIcATIOnWhICHaPAiNintHEaSS123",
success:function(data){
alert(data);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment