This forum is now read-only. Please use our new forums at

How to use APIs with Python Forum

View Course

1834 points
Submitted by
Ojas Rajwansh
over 3 years ago

12/20 [resolved] plz healp

import requests
response = requests.get("")

print the header information from the response

print = response.requests

0 votes


Hi Ojas,

Here is the error I see when I try your code:

Traceback (most recent call last):
  File "python", line 13, in <module>
AttributeError: 'Response' object has no attribute 'requests'

That is telling you that you can't use 'requests` as you have. This part of the error message is trying to point you in the right direction:

Oops, try again. You should call response.headers to get the header data attribute.

It means that you should use this code to print the headers:

print response.headers

3698 points
Submitted by
over 3 years ago


54c68b3a9113cb1e5200035f_114210188 Ojas Rajwansh over 3 years ago

yoo thanks that worked

55df2afa95e3787b9200005e_359368177 Judy over 3 years ago

You're welcome.