Change response.text => response.content for pdfs