Healthcheck with xml post in body

Hello, I have a healthcheck that requires a POST of xml in the body. I can run the below curl command and it works… but the question is how do I code this into the haproxy.cfg file?

curl -v mywebserver/wfc/XmlService -H “Content-Type: application/xml” -d "<?xml version='1.0'?><Kronos_WFC version='1.0'><Request Object='System' Action='Logon' Username='myuser' Password='mypass'/><Request Action='RetrieveResponseTime' retrieveFor='pingWithDB'><HeartBeat/></Request><Request Object='System' Action='Logoff'/></Kronos_WFC>"

Hi,

Managed to find a solution. Content-Length had to be exact…

option httpchk POST /wfc/XmlService HTTP/1.1\r\nHost:\ myserver.com\r\nContent-Type:\ text/xml\r\nContent-Length:\ 276\r\n\r\n<?xml\ version="1.0"?><Kronos_WFC\ version="1.0"><Request\ Object="System"\ Action="Logon"\ Username="myuser"\ Password="mypass"/><Request\ Action="RetrieveResponseTime"\ retrieveFor="pingWithDB"><HeartBeat/></Request><Request\ Object="System"\ Action="Logoff"/></Kronos_WFC>

Ended up here googling to do exactly the same thing with the same system. Thank you for documenting!