I figured it out. The WordPress HTTP API was doing it’s job; my problem was with the API I was working with. I just modified my code like:
$url="https://www.testurl.com";
$xml = <<<TESTED XML HERE>>>;
$response = wp_remote_post(
$url,
array(
'method' => 'POST',
'timeout' => 45,
'redirection' => 5,
'httpversion' => '1.0',
'headers' => array(
'Content-Type' => 'text/xml'
),
'body' => array('postdata' => $xml, 'postfield' => 'value'),
'sslverify' => false
)
);
Again…this was just a misunderstand of the API I was working with, not the HTTP API provided my WordPress.
Edit:
POST data should be supplied as an array, according to http://codex.wordpress.org/Function_API/wp_remote_post
The array will be transformed into a string like this:
key1=val1&key2=val2&…