refactor HTTPAPI spec a bit