Im using postman to call an API. The use case i have is I need to call the api using the Python-Requests and add error handling and e-mail confirmation. The response i get should be written to a file. Im completely new to python and does not have any expertise. Can someone help?
This is the python Requests code i have
import requests
url = "http://XXXX"
payload = {}
headers= {}
response = requests.request("GET", url, headers=headers, data = payload)
print(response.text.encode('utf8'))