"msg": "Status code was 401 and not [200]: HTTP Error 401: Unauthorized",
========================
============Curl - which is working==========
curl --location --request POST 'https://xyz.com/api.php' \
--header 'apikey: xyz' \
--header 'apitoken: xyz' \
--header 'cmd: xyz' \
--data-urlencode 'abc=123' \
--data-urlencode 'def=456'
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAL8fbwNu0iJWNBgT_igHHuec_paupGKO5%2BTDLM5ndhp2oUSv_w%40mail.gmail.com.