Add callback on HTTP requests in API

Testable here: http://preprod.cartoriviera.ch/admin/wsgi/apihelp.html?debug