【发布时间】:2020-02-19 00:33:39
【问题描述】:
我有 cURL 代码,我需要使用 requests 库将其转换为 python 代码。我想在 django 后端软件中使用它。 我尝试了几种方法,但我遇到了一些错误。有人可以帮我弄这个吗? 这是 cURL 代码:
curl -XPOST -H 'cache-control: no-cache' -H 'content-type: application/json' -H
'X-Client-Id: asdf1234' -H 'X-Client-Secret: qwer9876' -d '{
"planId":"BASIC", "planName":"Basic subscription plan", "amount":12,
"intervalType":"week", "intervals":2,"description":"This is the standard plan
for our services"}' 'https://test.cashfree.com/api/v2/subscription-plans'
【问题讨论】:
-
“我尝试了几种方法,但我得到了一些错误[r]s”——你尝试了什么?错误是什么?请阅读How to Ask 和Why is "Can someone help me?" not an actual question?。