On Wed, Jan 2, 2013 at 8:39 AM, Johannes Schlüter
<[email protected]> wrote:
> Stas Malyshev <[email protected]> wrote:
> >I'm thinking maybe the best solution is to have a new class - say,
> >CurlFile - and do this:
> >
> >$file = new CurlFile("myface.png", "image/png");
> >curl_setopt($ch, CURLOPT_POSTFIELDS, array("foo" => "bar",
> >"picture" =>
> >$file);
>
> What I wonder about in this thread: If we struggle here why not take the
> full step and abstract curl details comletely away and provide something
> like pecl/http by default instead?
Personally I've always hated using the cURL API in PHP and would love
to see a solid implementation included by default, but I would guess
that the general consensus would be that it could/should be done in
user-land.
Anyone know if Guzzle (http://guzzlephp.org/) handles this? I know
it's a popular HTTP client for PHP and is included in the Amazon Web
Service SDK (https://github.com/aws/aws-sdk-php).