Re: package proposal: HTTP_SimpleClient

From: Date: Wed, 04 Jun 2003 22:31:27 +0000
Subject: Re: package proposal: HTTP_SimpleClient
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-17024@lists.php.net to get a copy of this message
+1 on the proposal, tho' the name of HTTP_Client would be enough IMHO Code looks good on a cursory look-over. --- Alexey Borzov <borz_off@cs.msu.su> wrote: > Greetings! > > The HTTP::SimpleClient class wraps around HTTP::Request and provides a > higher level interface for performing HTTP requests: > > $client =& new HTTP_SimpleClient(); > $client->post($url, array('login' => $login, 'password' => > $password)); > > instead of > > $request =& new HTTP_Request($url); > $request->setMethod(HTTP_REQUEST_METHOD_POST); > $request->addPostData('login', $login); > $request->addPostData('password', $password); > $request->sendRequest(); > > Features: > * manages cookies and referrers between requests > * handles HTTP redirection > * ability to set default headers and request parameters > * implements the Subject-Observer design pattern: the base class sends > events to listeners that do the response processing. > > Source is available for review > > http://158.250.10.119/pear/SimpleClient.phps > http://158.250.10.119/pear/CookieManager.phps > http://158.250.10.119/pear/Listener.phps > > a usage example is available, too: a Listener implementation that does > link checking with a script to use this > http://158.250.10.119/pear/LinkChecker.phps > http://158.250.10.119/pear/link-checker.phps > > > -- > PEAR Development Mailing List (http://pear.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > ===== --- Jesus M. Castagnetto (jcastagnetto@yahoo.com) Research: http://metallo.scripps.edu/ Personal: http://www.castagnetto.org/ __________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com

« previous php.pear.dev (#17024) next »