response = requests.post(url, json=dict_element, headers=headers, verify=False)
with open("backup_output.txt", "wb") as f:
for dict_element in json_dict:
f.write(response.content)
print(response.content)
This is an example of what I DONT!! want to use.
response = requests.post(url, json=dict_element, headers=headers, verify=False)
with open("backup_output.txt", "wb") as f:
for dict_element in json_dict:
f.write(response.content)
print(response.content)
This writes the same output over and over to the same file, doesn't appropriately write a new file per response to my POST. Instead it takes the last post in a series of post request and writes that over and over again, not recording the response of the POST prior to the very last.