- make request_exec() always succeed (picky curl)
[m6w6/ext-http] / docs / examples / tutorial.txt
index 96ee9de72cd4652ccb7b9c1f3e856a77beaa6ae4..fbe9f210758fc659d7bdec23bbd57f5fcf083dd6 100644 (file)
@@ -28,7 +28,7 @@ $r->setQueryData(
 );
 
 // HttpRequest::send() returns an HttpMessage object
-// of type HttpMessage::RESPONSE or throws an exception
+// of type HttpMessage::TYPE_RESPONSE or throws an exception
 try {
        print $r->send()->getBody();
 } catch (HttpException $e) {
@@ -62,6 +62,7 @@ $r->setPostFields(
        )
 );
 // add the file to post (form name, file name, file type)
+touch('profile.jpg');
 $r->addPostFile('image', 'profile.jpg', 'image/jpeg');
 
 try {