We can still pass all the data to the hooks in both success and failure, I just want the header available on failure so I can see what is going on at once. 

If run the hooks before we remove the header it should be OK or we can store the http-buffer content in a variable. I think either way is fine.