12 $m = new http\Message;
14 $m->setRequestUrl("/foo");
15 } catch (http\Exception $e) {
16 echo $e->getMessage(),"\n";
18 $m->setType(http\Message::TYPE_REQUEST);
20 $m->setRequestUrl("");
21 } catch (http\Exception $e) {
22 echo $e->getMessage(),"\n";
25 $m = new http\Message;
27 $m->getParentMessage();
29 } catch (http\Exception $e) {
30 echo $e->getMessage(),"\n";
33 $m = new http\Message("HTTP/1.1 200\r\nHTTP/1.1 201");
35 $m->prepend($m->getParentMessage());
37 } catch (http\Exception $e) {
38 echo $e->getMessage(),"\n";
45 http\Message is not of type request
46 Cannot set http\Message's request url to an empty string
47 http\Message has no parent message
48 Cannot prepend a message located within the same message chain