<?php
echo "-TEST\n";
-$r = new HttpRequest('http://dev.iworks.at/.print_request.php', HTTP_METH_POST);
+$r = new HttpRequest('http://dev.iworks.at/ext-http/.print_request.php', HTTP_METH_POST);
$r->setContentType('text/xml');
-$r->setRawPostData(xmlrpc_encode_request('testMethod', array('foo' => 'bar')));
+$r->setBody(xmlrpc_encode_request('testMethod', array('foo' => 'bar')));
var_dump($r->send());
var_dump($r->send());
var_dump($r->send());
echo "Done\n";
?>
--EXPECTF--
-%sTEST
+%aTEST
object(HttpMessage)#%d (%d) {
["type:protected"]=>
int(2)
["body:protected"]=>
- string(309) "string(294) "<?xml version="1.0" encoding="iso-8859-1"?>
+ string(309) "string(294) "<?xml version="1.0" encoding="iso-8859-1%s]>
<methodCall>
<methodName>testMethod</methodName>
<params>
float(1.1)
["headers:protected"]=>
array(6) {
- %s
+ %a
}
["parentMessage:protected"]=>
NULL
["type:protected"]=>
int(2)
["body:protected"]=>
- string(309) "string(294) "<?xml version="1.0" encoding="iso-8859-1"?>
+ string(309) "string(294) "<?xml version="1.0" encoding="iso-8859-1%s]>
<methodCall>
<methodName>testMethod</methodName>
<params>
float(1.1)
["headers:protected"]=>
array(6) {
- %s
+ %a
}
["parentMessage:protected"]=>
NULL
["type:protected"]=>
int(2)
["body:protected"]=>
- string(309) "string(294) "<?xml version="1.0" encoding="iso-8859-1"?>
+ string(309) "string(294) "<?xml version="1.0" encoding="iso-8859-1%s]>
<methodCall>
<methodName>testMethod</methodName>
<params>
float(1.1)
["headers:protected"]=>
array(6) {
- %s
+ %a
}
["parentMessage:protected"]=>
NULL