What do you think about changing helpers.get_body to take (body, data, stream) rather than (resp), and then you can avoid introducing a side-effect?