I am trying to analyze the result of a HEAD request made using the Python Requests library, but the contents of the response may not seem available.
According to the docs, I should have access to the content from request.Response.text. This works fine for me in GET requests, but returns None HEAD requests.
GET request (works)
import requests response = requests.get(url) content = response.text
content = <html>...</html>
HEAD request (no content)
import requests response = requests.head(url) content = response.text
content = None
EDIT
OK. I quickly realized that HEAD responses should not return only content headers. But does this mean that to access the things found in the <head> page, for example, the <link> and <meta> , you need to GET the whole document?
Yarin
source share