Enabling PHP logging and reading logs showed the problem, thanks to Tom.
// Enable WP_DEBUG mode
define( 'WP_DEBUG', true );
// Enable Debug logging to the /wp-content/debug.log file
define( 'WP_DEBUG_LOG', true );
// Disable display of errors and warnings
define( 'WP_DEBUG_DISPLAY', true );
[16-Jan-2024 09:34:09 UTC] PHP Notice: PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension. in /var/www/html/wordpress/wp-includes/IXR/c lass-IXR-message.php on line 48
A simple apt install php-xml fixed it
curl -X POST http://localhost:80/wordpress/xmlrpc.php -d '<?xml version="1.0"?><methodCall><methodName>system.listMethods</methodName></methodCall>' | head
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
<?xml version="1.0" encoding="UTF-8"?> 0 --:--:-- --:--:-- --:--:-- 0
<methodResponse>
<params>
<param>
<value>
<array><data>
<value><string>system.multicall</string></value>
<value><string>system.listMethods</string></value>
<value><string>system.getCapabilities</string></value>
<value><string>demo.addTwoNumbers</string></value>
100 4361 100 4272 100 89 173k 3709 --:--:-- --:--:-- --:--:-- 185k
curl: Failed writing body
Python client also doesn’t error now