Re: PEAR2_Http_Request / HTTP_Request2

From: Date: Tue, 11 Sep 2007 21:25:48 +0000
Subject: Re: PEAR2_Http_Request / HTTP_Request2
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-48002@lists.php.net to get a copy of this message
On 9/11/07, Christian Schmidt <pear.php.net@chsc.dk> wrote: > David Coallier wrote: > > Some people configure with sockets, some people don't. > fsockopen() is always there, isn't it? But > > > What is wrong with having the choice without the loss of speed ? > Nothing is wrong with choice. I was merely asking why one would want to > choose :-) > > Allowing choice isn't free in terms of complexity, development, QA, > etc., though, so I don't believe in adding choice just for the sake of > it. That's why I am asking. > > > Also preference, some people swear only by curl, some others by streams. > I assume the purpose of making different adapters is to provide a > uniform API to the different ways of making HTTP requests in PHP, so why > would one care about what's inside? Or are certain adapters expected to > have specific features that cannot be implemented in the other? > > If different adapters are necessary to allow the package to work on as > many platforms/systems as possible, I think it's a worthy goal. On the > other hand, I think your example about people compiling a custom version > of curl with special features on the surface sounds a bit esoteric :-) It's a matter of dependencies: * socket support can be disabled * SSL support for streams is only enabled if compiled with openssl, and is sometimes problematic * curl support can be disabled * ext/http was not bundled by default until the PHP 5.2 series, and might be unavailable Having a uniform API that allows users to choose which extension to use based on their installation makes absolute sense here. -- Matthew Weier O'Phinney mweierophinney@gmail.com http://weierophinney.net/matthew/

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