【发布时间】:2021-05-06 05:33:33
【问题描述】:
我试图在 swift 中使用 Plaid API,但似乎他们无法在 swift 中原生地发出 API 请求,但他们确实有 curl。我知道您可以快速发出 curl API 请求。
文档在 curl 中显示此 API 请求
curl -X POST https://sandbox.plaid.com/link/token/create -H 'Content-Type: application/json' -d '{
"client_id": "CLIENT_ID",
"secret": "SECRET",
"user": { "client_user_id": "unique-per-user",
},
"client_name": "Plaid App",
"products": ["auth"],
"country_codes": ["GB"],
"language": "en",
"webhook": "https://sample-web-hook.com",
"account_filters": {
"depository": {
"account_subtypes": ["checking"]
}
}
}'
我如何将此 curl 请求转换为 swift - 特别是在 swiftUI 中。
谢谢
【问题讨论】: