Good afternoon! I have a script in python that needs to pass a Json via URL to an application, which validates through the mac address. With a lot of research, I've been testing the code below, even to get an understanding of what's going on. For the sake of starting in Python. When I run the script it does not give any error, or it accuses at least the attempt to pass something invalid in the log.
import json
url = 'http://aplicacao.com.br/recebe'
files = {'file': ('file.json', open('file.json', 'rb'))}
headers = {'content-type': 'application/json'}
My file file.json looks like this:
[{"nome": "nome", "end": "end", "email": " email", "tel": "tel"},
{"nome": "nome", "end": "end", "email": " email", "tel": "tel"}]
Thank you