我将一些自动化脚本从bash移植到python,它们几乎都是以下格式的curl命令:
curl -k -H "Content-Type: application/json" -X POST -d '{ "Request": {
"MessageID": "xxxx",
"MessageDateTime": "xxxxx",
"SourceSystem": "xxxx",
}
}' https://myUrl.xxx
在Python中准确地构造它的最佳方法是什么?到目前为止,我已经:
^{pr2}$我希望确保-k、-d和-x bash选项在该脚本中得到反映。谢谢您!在
您可以直接使用
requests.post
。-k
对应于verify=False
:相关问题 更多 >
编程相关推荐