Make the HTTP client more generic

This way we can send other headers and use HEAD requests.

Also fixes some cases where !progress would crash.

-[Unknown]
Hm. Doesn't this do the same thing as the next line? 

Also having two functions named Take with different semantics (one erases from data_, one doesn't) does not seem clean.