getting jsonp to work in asp.net api -


having issues getting jsonp work client backbone script,pagenator keep gettgin invalid key error having looked around people to service not return jsonp.

for example syntaxerror: invalid label, i've written mvc4 web api service returns right , there need add api support jsonp ?

   {       "odata.metadata":"http://test.test.uk/api/odata/$metadata#lnews","value":[         {           "id":1,"title":"this test news artical","maincontent":"<p>\r\n\tthis test article</p>\r\n","featured":1,"visiblehomepage":1,"thedatetime":"2013-08-05t10:36:05.98","expireon":"2013-08-15t00:00:00","category":17,"embargo":null,"embargotime":"pt0s","embargodate":null,"customthumbnail":null,"news_layout":3,"lnbe":0,"lnbn":0,"lnbs":0,"lnbw":0,"lnwv":0,"lnws":1,"lndy":0,"lnsw":0,"lnsh":0,"lncv":0         },{           "id":2,"title":"this test article","maincontent":"<p>\r\n\twelcome best site in world</p>\r\n","featured":1,"homepage":1,"thedatetime":"2013-08-05t10:42:54.763","expireon":"2013-08-22t00:00:00","category":null,"embargo":null,"embargotime":"pt0s","embargodate":null,"customthumbnail":"water lilies.jpg","news_layout":4,"lnbe":1,"lnbn":1,"lnbs":1,"ff":1,"lnwv":1,"lnws":1,"lndy":1,"lnsw":1,"lnsh":1,"lncv":1         }       ]     } 

here jsonp url:

http://odata.netflix.com/v2/catalog/genres?$format=json&$callback=? 

here diagram:

  client                   server ------                   ------  makes url request        looks function matching url param ($callback)  executes asynchonously   if found, executes function asynchonously  returns callback    returns data server side function, or error  

references


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -