Re: package proposal: HTTP_SimpleClient
| From: | Alexey Borzov | Date: | Wed, 04 Jun 2003 12:58:37 +0000 |
| Subject: | Re: package proposal: HTTP_SimpleClient | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-17004@lists.php.net to get a copy of this message | ||
Hi!
LIMBOURG Arnaud wrote:
I wonder about that. The code looks good and it is quite simple to use. But, is saving the extra couple of lines when using HTTP_Request directly worth the effort of abstracting it ? Isn't that too many layers of abstraction ? ps: i'm not starting a flamewar it is merely something i'm wondering about.It is a valid question. But the class not only wraps around HTTP_Request, but also adds some value: 1) Cookie management. Consider the following: you have to authorize to a web-application (and receive a session cookie), then fill some forms, then get the resultant page. 2) Redirection support. I know that HTTP_Request now has this, too, but: a) I don't think that the class that represents a *single* request should have one b) It is buggy. To sum it up: HTTP_Request is the class to perform *one* request, HTTP_SimpleClient is designed to make it easier to perform *multiple* requests and to keep/process their results.