couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <>
Subject Re: proxy handler
Date Sun, 05 Jul 2009 18:49:57 GMT
2009/7/5 Chris Anderson <>:

> This looks really cool. Can you give more examples of it at work? I'm
> not sure I total understand. Looks powerful.

Main use for this is is proxying remote http services like an XMPP
bosh connection, or any ajax service that don't do JSONP. Obviously
couchapps will have some usage for this. Indeed, with this proxy, you
could aggregate different services on your pages and use them without
worrying about cross-domain problem.

All you have to proxy a service is to set a local path and destination
path like this :

_couchdb = {couch_httpd_proxy_handler, handle_proxy_req,
_friendpaste = {couch_httpd_proxy_handler, handle_proxy_req,

and now you could do use friendpaste api from your application. (which
won't be needed soon, but that's another story).

Right now the request body isn't streamed and I would like to have a
way to send it whil receiving it. Maybe it's not possible but I failed
for now to understand how mochiweb api works with it.

Hope it's more understandable now :)

- benoƮt

View raw message