简体   繁体   English

'requests.head()' 在 python 请求中做了什么?

[英]What does 'requests.head()' do in python requests?

import requests
send = requests.head('https://httpbin.org')
print(send.text)

What does 'requests.head()' do? 'requests.head()' 有什么作用? i get empty responses我得到空的回复

A head request is a request used when you do not actually need the page content - just the status-code of your connection with the site or http-headers.头请求是在您实际上不需要页面内容时使用的请求 - 只是您与站点或 http-headers 连接的状态代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM