我有下面的代码,我已经写了很多模块和问题后,在堆栈上看,但我不断得到一个500响应错误时,试图提交一个订单?resposne的文本总是类似于“Internal sever error”,后跟一个13?总是不同的数字
import requests
import json
my_aid = xxxxxxxx
loan_id = yyyyyyyyy
url = 'htpps://api.lendingclub.com/api/investors/v1/accounts/xxxxxxxxx/orders'
header = {'Authorization':*my_AUTH*}
payload = {
'aid':my_aid,
'orders':[{
'loanId':loan_id,
'requestedAmount':25.0,
}]
}
resp = requests.post(url,headers=header,data=json.dumps(payload))
有什么想法吗?你知道吗
将标题改为
header={'Authorization':myAUTH,'Content-Type':'application/json'}
相关问题 更多 >
编程相关推荐