Below is my curl command which I send via Mac terminal and works well. I need to send it via iOS swift. I am using Alamofire. How can I add these header, user, and data (-H,-u,-X and -d) in Alamofire POST request.
I saw this thread but it is only to add (-H) headers. I also need to send -u (user) and -d (data) in POST request. Please someone help.
curl -H "Accept: application/vnd.conekta-v1.0.0+json" \
-H "Content-type: application/json" \
-u key_SOME_API_KEY: \
-X POST -d '{
"description":"Stogies",
"amount": 50000,
"currency":"USD",
"details": {
"name": "Arnulfo Quimare",
},
}'