Improve test coverage of HTTP API

why do you make this change? for testing?