Improve exceptions by adding the server's response

Hey barnabywalters,
thank you for this incredibly useful script.

I'd suggest to improve the exceptions thrown if the server returns a request with an error code, by adding the server's response, because it will eventually hold some information about the occurring error.
In my case it took hours to find out the url was misspelled, what I could have found out earlier by having the server's response.

I hope you will find my changes useful.