Carlos Aguni

Highly motivated self-taught IT analyst. Always learning and ready to explore new skills. An eternal apprentice.


CURL data-urlencode + Flask

04 Jul 2020 » programming
subject="subject"
body=$(cat ./lol)
curl -XPOST --data-urlencode "payload={\"subject\": \"$subject\", \"msg\": \"$body\"}" <url> 
req = request.form.get("payload")
req = json.loads(req, strict=False)