HTTP API: adapting to new protocol