Templar
Templar

Reputation: 35

How to get response headers in python requests

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?

Upvotes: 2

Views: 4938

Answers (1)

token
token

Reputation: 933

This is the way you print requests response headers:

print(x.headers)

Upvotes: 3

Related Questions