Handle a file open default extension and make a web request
===

I'm trying to find the easiest way to have a proxy app running on my machine (I'm on a Mac, but it would be great to work across platforms), that I can register to default open a custom file extension, read it's text contents and make an http request (for instance, based on the info in the file). How could I go about putting that together the quickest way (my background is in web standards and nodejs), or is there already some software, free or paid, maybe even bash or Automator, that provides such programmability?