How to get response headers in python requests

Viewed 2343
x = r.post(url="https://example.com",headers=H1,data=D1)
print(x.request.headers)

I'm trying to print out the received headers from the post request, how would I do this?

1 Answers

This is the way you print requests response headers:

print(x.headers)

Related