d8a7e666443b92b6fb2e916b62c074af3fd39426
[m6w6/ext-http] / HttpRequest_007.phpt
1 --TEST--
2 HttpRequest PUT
3 --SKIPIF--
4 <?php
5 include 'skip.inc';
6 checkcls('HttpRequest');
7 ?>
8 --FILE--
9 <?php
10 echo "-TEST\n";
11
12 $r = new HttpRequest('http://dev.iworks.at/.print_request.php', HTTP_METH_PUT);
13 $r->recordHistory = true;
14 $r->addHeaders(array('content-type' => 'text/plain'));
15 $r->setPutFile(__FILE__);
16 $r->send();
17 var_dump($r->getRawRequestMessage());
18 echo "Done\n";
19 ?>
20 --EXPECTF--
21 %sTEST
22 string(467) "PUT /.print_request.php HTTP/1.1
23 User-Agent: PECL::HTTP/0.21.0dev (PHP/5.1.2-dev)
24 Host: dev.iworks.at
25 Accept: */*
26 content-type: text/plain
27 Content-Length: 278
28 Expect: 100-continue
29
30 <?php
31 echo "-TEST\n";
32
33 $r = new HttpRequest('http://dev.iworks.at/.print_request.php', HTTP_METH_PUT);
34 $r->recordHistory = true;
35 $r->addHeaders(array('content-type' => 'text/plain'));
36 $r->setPutFile(__FILE__);
37 $r->send();
38 var_dump($r->getRawRequestMessage());
39 echo "Done\n";
40 ?>
41 "
42 Done
43