DRY the http_api_nostream

![mop](https://f.cloud.github.com/assets/1065/1683348/c61f2064-5dbc-11e3-891a-233ac491dcaa.jpg)

Probably 80% has been copied wholesale from `http_api` and should either just be imported or things should be refactored a bit to remove the duplication.