DEV Community

Shahanshah Alam
Shahanshah Alam

Posted on

Add certificate and key in https request swift.

Hi
I have this cURL, I want to convert it into swift but I am not able to figure out the cert and key part.
curl -L -i -X PUT โ€“cert ./[device_cert].pem โ€“key ./[device_cert_private_key].pem -H 'Content-Type: application/json' -H 'Content-Encoding: utf-8' -d '{"registrationId": "[registration_id]"}' https://global.azure-devices-provisioning.net/[ID_Scope]/registrations/[registration_id]/register?api-version=2021-06-01
Please help!

Top comments (0)