<?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());
object(HttpMessage)#%d (%d) {
["type:protected"]=>
int(2)
- ["httpVersion:protected"]=>
- float(1.1)
- ["responseCode:protected"]=>
- int(200)
- ["responseStatus:protected"]=>
- string(2) "OK"
- ["requestMethod:protected"]=>
- string(0) ""
- ["requestUri:protected"]=>
- string(0) ""
- ["headers:protected"]=>
- array(6) {
- %s
- }
["body:protected"]=>
string(309) "string(294) "<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
</methodCall>
"
"
-}
-object(HttpMessage)#%d (%d) {
- ["type:protected"]=>
- int(2)
- ["httpVersion:protected"]=>
- float(1.1)
- ["responseCode:protected"]=>
- int(200)
- ["responseStatus:protected"]=>
- string(2) "OK"
["requestMethod:protected"]=>
string(0) ""
- ["requestUri:protected"]=>
+ ["requestUrl:protected"]=>
string(0) ""
+ ["responseStatus:protected"]=>
+ string(2) "OK"
+ ["responseCode:protected"]=>
+ int(200)
+ ["httpVersion:protected"]=>
+ float(1.1)
["headers:protected"]=>
array(6) {
%s
}
+ ["parentMessage:protected"]=>
+ NULL
+}
+object(HttpMessage)#%d (%d) {
+ ["type:protected"]=>
+ int(2)
["body:protected"]=>
string(309) "string(294) "<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
</methodCall>
"
"
-}
-object(HttpMessage)#%d (%d) {
- ["type:protected"]=>
- int(2)
- ["httpVersion:protected"]=>
- float(1.1)
- ["responseCode:protected"]=>
- int(200)
- ["responseStatus:protected"]=>
- string(2) "OK"
["requestMethod:protected"]=>
string(0) ""
- ["requestUri:protected"]=>
+ ["requestUrl:protected"]=>
string(0) ""
+ ["responseStatus:protected"]=>
+ string(2) "OK"
+ ["responseCode:protected"]=>
+ int(200)
+ ["httpVersion:protected"]=>
+ float(1.1)
["headers:protected"]=>
array(6) {
%s
}
+ ["parentMessage:protected"]=>
+ NULL
+}
+object(HttpMessage)#%d (%d) {
+ ["type:protected"]=>
+ int(2)
["body:protected"]=>
string(309) "string(294) "<?xml version="1.0" encoding="iso-8859-1"?>
<methodCall>
</methodCall>
"
"
+ ["requestMethod:protected"]=>
+ string(0) ""
+ ["requestUrl:protected"]=>
+ string(0) ""
+ ["responseStatus:protected"]=>
+ string(2) "OK"
+ ["responseCode:protected"]=>
+ int(200)
+ ["httpVersion:protected"]=>
+ float(1.1)
+ ["headers:protected"]=>
+ array(6) {
+ %s
+ }
+ ["parentMessage:protected"]=>
+ NULL
}
Done