Skip to content

Instantly share code, notes, and snippets.

@trepca
Created March 7, 2010 00:08
Show Gist options
  • Save trepca/324029 to your computer and use it in GitHub Desktop.
Save trepca/324029 to your computer and use it in GitHub Desktop.
function makeSignedRequest() {
var params = {'person': 1, 'context':100};
params[gadgets.io.RequestParameters.AUTHORIZATION] = gadgets.io.AuthorizationType.SIGNED;
params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.TEXT;
params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.POST;
var url = "http://www.test.com/resource";
gadgets.io.makeRequest(url,authResponse, params);
}
function authResponse(data) {
for(var i in data) {
alert(i+'='+data[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment