Created
October 10, 2012 17:01
-
-
Save lholmquist/3866918 to your computer and use it in GitHub Desktop.
Pipeline jsonp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://github.com/lholmquist/WoWAerogear if you have yeoman installed, you should be able to do yeoman server, might have to do yeoman build first though | |
//excerpt from app.js | |
pipeline.add( { | |
name: "wowPipe", | |
settings: { | |
baseURL: "http://us.battle.net/api/wow/", | |
endpoint: "achievement/2144", //this should be in the read method, need datamanager for that? | |
jsonp: true, | |
callback: "myCallback" //possibly a jsonp settings:{ } instead? | |
} | |
} ); | |
//in AeroGear.Pipeline.adapters.Rest | |
//Updated the ajaxSettings | |
........ | |
ajaxSettings = { | |
// use the pipeName as the default rest endpoint | |
url: settings.baseURL ? settings.baseURL + endpoint : endpoint, | |
jsonp :settings.jsonp ? "jsonp" : null, | |
dataType: settings.jsonp ? "jsonp" : "json", | |
jsonpCallback: ( settings.jsonp && settings.callback ) ? settings.callback : null | |
}, | |
........ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment