Re[2]: [PEAR-DEV] HTTP_Request patch for Multiple requests support
| From: | Alexey V. Borzov | Date: | Sun, 29 Sep 2002 16:27:34 +0000 |
| Subject: | Re[2]: [PEAR-DEV] HTTP_Request patch for Multiple requests support | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-9688@lists.php.net to get a copy of this message | ||
Hello Richard,
Sunday, September 29, 2002, 5:50:39 PM, you wrote:
RH> Hi,
>> Coming with another patch to HTTP_Request to add support for
>> multiple requests:
>> - preserves the current API
>> - externalize the constructor into a setRequest() method, for
>> multiple calls
>> - reset _postData attribute, but not other attributes, in
>> order to reuse them in next calls
>> (this way, you don't have to set again proxy or auth settings
>> for each call)
>> - added a _cookies attribute to store cookies accross successive calls
>> - modified sendRequest() method, to add all stored cookies to
>> the request headers before sending the request, and then
>> store cookies returned in the response headers, to be able to
>> resend them in the next call
RH> Nice idea, though wouldn't it be better as a wrapper class? Something
RH> like (eg) HTTP_Client, which is a composite of multiple HTTP_Requests.
+1 for this. In fact, I built such a wrapper class, it is quite
simple to do so. Unfortunately, I cannot share it, for it it too
specific for our needs.
But I can share a generic cookie management class for a possible HTTP_Client
class:
http://beta.rdw.ru/pear/cookieManager.phps
Took me some time to translate all comments in it to English. :]
--
С уважением, Алексей Борзов
отдел интернет-проектов ООО "РДВ-Медиа"
http://www.rdw.ru
http://www.vashdosug.ru