HTTPy-RPC is a project mainly written in PYTHON and JAVASCRIPT, it's free.
Example implementation of a simple HTTP-based RPC protocol.
Yes, it's reinventing the wheel. It was just an exercise.
The codebase serves as an example implementation as well, and includes a hhtpy-rpc plugin for jQuery.
The static/js/test.js contains a very simple use-case example.