Doc #60950 [Opn->Wfx]: Missing exceptions on ($HttpRequest)->send()

From: Date: Tue, 16 Jun 2015 07:42:27 +0000
Subject: Doc #60950 [Opn->Wfx]: Missing exceptions on ($HttpRequest)->send()
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-12438@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=60950&edit=1

 ID:                 60950
 Updated by:         mike@php.net
 Reported by:        sumariva at gmail dot com
 Summary:            Missing exceptions on ($HttpRequest)->send()
-Status:             Open
+Status:             Wont fix
 Type:               Documentation Problem
 Package:            pecl_http
 PHP Version:        5.3.9
 Block user comment: N
 Private report:     N



Previous Comments:
------------------------------------------------------------------------
[2012-08-17 05:14:01] kilbyc at bellsouth dot net

I have this same complaint. The caught error is not clearly documented, and the actual important
error is in HttpException->innerException which is not documented anywhere.
I found this:
http://www.mkfoster.com/2009/01/06/how-to-pecl-http-request-exception-and-error-handling/
It is now my standard reference for using HttpRequest.

------------------------------------------------------------------------
[2012-06-19 00:05:01] ehalls at gmail dot com

~Also have this issue for v1.7.4 and php 5.4.

Exception handling within the response class I presume.

------------------------------------------------------------------------
[2012-02-01 20:05:00] sumariva at gmail dot com

Description:
------------
Hello I got the following exception launched on method ($HttpRequest)->send():
HttpInvalidParamException .
But this is not listed on current documentation.

Also the exception parent class HttpException is missing on docs.
Could you add the exception related classes to the Http package documentation.

That would be nice for first users of this package.



Test script:
---------------
# point to some url that will not response #
$req = new HttpRequest(
        "http://anyurl-that-will-timeout"
       ,HttpRequest::METH_GET
);

$req->send();



Expected result:
----------------
An exception from the listed ones on documentation.

Actual result:
--------------
Fatal error: Uncaught exception 'HttpInvalidParamException' with message 'Empty or
too short HTTP message: '''


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=60950&edit=1


Thread (4 messages)

« previous php.doc.bugs (#12438) next »