Correctly log response.code

Was getting errors `NameError: undefined local variable or method `r'`, this should fix that
Merge pull request #57 from zackshapiro/patch-2

Correctly log response.code