问题描述
我正在尝试使用 POST 方法(Revenue REST API),但我总是收到错误消息“Content-Type not application/json”。
The strange is that I'm using their website to test: [https://docs.revenuecat.com/reference#receipts][1]
curl --request POST \
--url https://api.revenuecat.com/v1/receipts \
--header 'Accept: application/json' \
--header 'Authorization: Bearer xxxx' \
--header 'Content-Type: application/json' \
--header 'X-Platform: android' \
--data '
{
"product_id": "xxxx","price": 12.9,"currency": "BRL","is_restore": "false","app_user_id": "xxxx","fetch_token": "xxxxxx"
}
'
有什么线索吗?
解决方法
我已经使用 CURL 运行了代码并且它工作正常。问题出在 Revenuecat 网站上。