added code attribute to response obj in urlretrieve

Forgot to run the tests in my last PR. Added the code attribute back to the response object and the tests now pass.