Http Requests


I am in the early stages of creating an App to display additional information on users who have submitted tickets.  To do this I have created a REST web service using WCF which serves up data from our local customer database.

I've made my app as close as possible to the example Bookmarks app but I cannot get the HTTP requests to work.  Here is my app.js code:


function() { return { requests: { fetchUserData: function() { return { url: 'http://testing.policyworks.com/MaxDataService/APIs/MaxDataRetriever.svc/UserData/chad.pickerell@policyworks.com', type: 'GET' }; } }, events: { 'app.activated' : 'requestUserData', 'fetchUserData.always': function(e, data) { this.renderUserData((data || {}).userInfo); }, }, requestUserData: function() { this.ajax('fetchUserData'); }, renderUserData: function(userInfo) { this.userInfo = userInfo; this.switchTo('list', { userInfo: this.userInfo}); } }; }());

I am pretty sure all of my method calls are working as my 'list' template is showing up properly but my web service is not getting hit.  I feel like I am missing something small but significant.  Any help or suggestions would be much appreciated.


Please sign in to leave a comment.
Help them find what they're looking for
Create an online destination for 24/7 support with Zendesk