0
我想讀取在Python中使用curl
-d
選項通過的數據。如何在python中讀取由--data在Curl中傳遞的數據?
的數據是JSON,我試圖用 --data
'{"title":"foobar","body": "This body has both "double" and 'single' quotes"}'
request.get_json()
request.json.get('title')
...但我無法得到它的工作 。
捲曲-k -i -X POST -H 「內容類型:應用/ JSON」 --data二進制「{ 「標題」: 「foobar的」,」身體「:」這個身體同時具有「雙」和「單」引號「}'-L-Xyzwus-west-2.compute.amazonaws.com/test –
發佈您的錯誤以及。 – ayushgp