Skip to content

Instantly share code, notes, and snippets.

@madpilot
Created November 6, 2013 03:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save madpilot/7330189 to your computer and use it in GitHub Desktop.
Save madpilot/7330189 to your computer and use it in GitHub Desktop.
The Problem: We have a WCF JSON API, that we need to make accessible from third-party sites (on IE7+), so JSON-P looks like a good solution.
Issue is, (what the .NET guy here has told me), each endpoint in the WCF router will need to be re-written (or added to) to handle GETs (We currently use GET, POST, and DELETE depending on the action). That sucks.
My idea: An IIS module (handler?) that intercepts JSON-P requests, and transforms the request to something the WCF router can handle, then pads the response. Basically transparent JSON-P padding around WCF.
Make sense? Does this exist already?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment