Add httpd mode

Hi @tily,

I have added the http api mode. This is experimental, but I hope you'll find this interesting.