Abstract http details away into a pluggable client
Wrote tests for decodeURL and simplified it greatly
use httputil.HTTPErrorf