curl -i -H "Content-Type: application/json" -X POST -d '{"message":
"test"}' http://localhost:5000/members
This is my old code which was working as a command (returns a 200). now i want to write a python skript for that using requests. I am trying this:
header = {"Content-type": "application/json"}
r = requests.post("http://127.0.0.1:5000/members", data={"message": "test"}, headers=header)
Which returns an 400. Why? How can i fix that? Its btw a flask rest api running on that port.