-1

How do I make a HTTP HEAD request using the requests library?

LogicalBranch
  • 4,248
  • 4
  • 21
  • 54
  • Possible duplicate of [Getting HEAD content with Python Requests](https://stackoverflow.com/questions/9554947/getting-head-content-with-python-requests) – buran Jun 04 '19 at 17:57
  • @buran No, it's not because I don't want to get the content, I only want the header data. – LogicalBranch Jun 04 '19 at 17:58
  • 1
    did you even read the question - the answer is in the question itseld as well as in the answer, or number of other similar ones, or even did you bother to check the quick start (no research at all)? – buran Jun 04 '19 at 18:04

1 Answers1

1

You use the head() function:

r = requests.head(INSERT_URL_HERE)
jwodder
  • 50,627
  • 10
  • 99
  • 112