fix test and implementation for http-request