Getting Curl Error code 6 when making a PUT request in Execute External command Step - using Curl command as below within a VSM.
curl: (6) Could not resolve host: application
curl: (6) Could not resolve host: "https
curl -k -w %{response_code} --location --request PUT http://localhost:46766/v2/pet --cert \path\certfile.p12:passcode --cert-type P12 --header Accept-Language:en-US --header Content-Type:application/json --header Accept:application/json --data-raw '{\"userName\": \"***\",\"nn\":\"xxxx\",\"givenName\": \"xxxx\",\"mail\": \"uxxxx@***.com\",\"telephoneNumber\": \"09876543\",\"password\": \"******\"}'
DevTest 10.8.0 or newer
Curl is unable to translate the hostname and headers due to extra whitespaces and escape characters in JSON request body for --data-raw parameter.
Removing escape characters and spaces in JSON request in the CURL command --data-raw parameter gave valid response.
curl -k -w %{response_code} --location --request PUT http://localhost:46766/v2/pet --cert \path\certfile.p12:passcode --cert-type P12 --header Accept-Language:en-US --header Content-Type:application/json --header Accept:application/json --data-raw '{"userName": "***","nn": "xxxx","givenName": "xxxx","mail": "uxxxx@***.com","telephoneNumber": "09876543","password": "******"}'
Running VS in Workstation ITR, the below command works with escape characters and spaces in JSON request
curl -k -w %{response_code} --location --request PUT http://localhost:46766/v2/pet --cert \path\certfile.p12:passcode --cert-type P12 --header Accept-Language:en-US --header Content-Type:application/json --header Accept:application/json --data-raw '{\"userName\": \"***\",\"nn\": \"xxxx\",\"givenName\": \"xxxx\",\"mail\": \"uxxxx@***.com\",\"telephoneNumber\": \"09876543\",\"password\": \"******\"}'