ThePort's Product and Technology blog. We'll share helpful tips about the platform, talk about upcoming releases, and maybe on occasion share a story or two on how awesome the team is here.
Coming 2nd Quarter 2010: Port2Port data available in JSONP
Posted by
DuganTuesday, April 06, 2010
As you may be aware, we have been exposing Port2Port apis via xml for some time now. Xml is great for server-to-server calls where the caller (i.e. "you the developer") wants to fetch an xml representation of some object in thePort's system, do something with that xml, and then serve it out however you see fit. However, a question we had been getting quite often is "Sure, I can work with xml, but what I'd really like to do is more client-side calls directly to your api's and let my javascript process that data".
Enter JSONP or "JSON with padding". Our apis now allow you to submit the name of your method in the querystring:
Notice "callback" specified in the querystring. Supplying this will take the Json payload and wrap your method around it before it comes back to the client. That javascript method will then execute as expected.
Further JSONP reading
here.