Hi, I want to call a webhook from Ansible via the URI module, this is the playbook: --- - hosts: localhost tasks: - name: Call webhook uri: url: https://xxx/webhooks?token=xxxx method: POST
I get the following error: "content": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"\"http://www.w3.org/TR/html4/strict.dtd\">\r\n<HTML><HEAD><TITLE>Length Required</TITLE>\r\n<META HTTP-EQUIV=\"Content-Type\" Content=\"text/html; charset=us-ascii\"></HEAD>\r\n<BODY><h2>Length Required</h2>\r\n<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>\r\n</BODY></HTML>\r\n" "msg": "Status code was not [200]: HTTP Error 411: Length Required", "redirected": false, "server": "Microsoft-HTTPAPI/2.0", "status": 411, When I try to access the webhook via Powershell, it works without a problem. $uri = "https://xxx/webhooks?token=xxxx" $response = Invoke-RestMethod -Method Post -Uri $uri Can somebody point me in the right direction? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscr...@googlegroups.com. To post to this group, send email to ansible-project@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2135071c-6d6b-49f6-bc85-fd17bd0906a7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.