how to use python “requests” module to check if the page using “GET” method or “POST” method.
i expect output as True or False , or GET or Post
expected code:
<code>import requests
url = f"www.get_example.com"
response = requests.get(url)
if response.check_get == True:
print("get")
</code>
<code>import requests
url = f"www.get_example.com"
response = requests.get(url)
if response.check_get == True:
print("get")
</code>
import requests
url = f"www.get_example.com"
response = requests.get(url)
if response.check_get == True:
print("get")
New contributor
malik alfutaisy is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.