http: implement first version of public API