Reading server response from requests module in Python

0 votes
I made a request using the requests module in Python. I got the server response and now I want to read the response as plain text. Is there a way to do it?
May 14, 2019 in Python by Esha
210 views

1 answer to this question.

0 votes

You can read the response using the text option on the response. 

>>> r = requests.get('<url>')
>>> r.text
answered May 14, 2019 by Kunal

Related Questions In Python

0 votes
1 answer

How to connect mail server with smtplib module in python?

Hi@akhtar, You can connect mail server using smtplib ...READ MORE

answered Apr 15, 2020 in Python by MD
• 95,360 points
840 views
0 votes
1 answer

How to access a module written in Python from C?

Hey, @Roshni: You can access a module written ...READ MORE

answered Jun 26, 2020 in Python by Gitika
• 65,870 points
997 views
0 votes
1 answer

Why is reading lines from stdin much slower in C++ than Python?

tl;dr: Because of different default settings in ...READ MORE

answered Dec 18, 2020 in Python by Nikita
340 views
0 votes
1 answer

How can I find out the index of an element from row and column in Python?

You probably want to use np.ravel_multi_index: [code] import numpy ...READ MORE

answered Apr 16, 2018 in Python by charlie_brown
• 7,710 points
1,144 views
0 votes
2 answers
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 2,896 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
2,132 views
0 votes
1 answer

How to get URL from Python requests response?

Once you get the response, you'll find ...READ MORE

answered May 14, 2019 in Python by Firoz
434 views
0 votes
2 answers

Extracting data from a JSON file in Python

Here is what i found and was ...READ MORE

answered Nov 27, 2018 in Python by Rupali
27,973 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP