This is my curl url
curl -X POST https://fax.twilio.com/v1/Faxes \
--data-urlencode "From=+15017122661" \
--data-urlencode "To=+15558675310" \
--data-urlencode "MediaUrl=https://www.twilio.com/docs/documents/25/justthefaxmaam.pdf" \
-u ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:your_auth_token
How can i implement this in Almofire? I am trying like this way.
AF.request(URL(string: "https://fax.twilio.com/v1/Faxes")!, method: .post, parameters: params, encoding: JSONEncoding.default, headers: headers).authenticate(username: "", password: "").responseJSON { response in
print(response)
}
how can i implement data-urlencode "From=+15017122661" in almofire?
Try this code with Alamofire:
I've tested with my creds - it should be work, but I haven't real devices for in/out fax