Re: Re: [PEPr] Comment on HTTP::HTTP_OAuth
| From: | Daniel O'Connor | Date: | Wed, 29 Jul 2009 22:57:51 +0000 |
| Subject: | Re: Re: [PEPr] Comment on HTTP::HTTP_OAuth | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-52529@lists.php.net to get a copy of this message | ||
>
> I used pecl_http for the HttpMessage class and support for responses. The
> HTTP_OAuth_Consumer_Response, HTTP_OAuth_Provider_Request, and
> HTTP_OAuth_Provider_Response all decorate HttpMessage. I use
> HttpMessage::fromEnv() as a default way of constructing a response,
> therefore it will grab the existing headers set, body, etc. HTTP_Request2
> does not have much support for responses. There is a lot of header parsing
> and setting in OAuth requests and I prefer not using header() directly.
>
HTTP_Request2_Response perhaps?
it's got getHeader($name), getBody(), getStatus(), etc...
http://pear.php.net/package/HTTP_Request2/docs/latest/HTTP_Request2/HTTP_Request2_Response.htmlfor
more
Another advantage to HTTP_Request2 is the ability to swap from a
sockets/curl driver to a mock driver for unit tests, so you can similate
everything in memory (super fast, controlled tests hurray)