Re: Re-using HTTP_Request2 for multiple requests
Alexey Borzov <[email protected]>
| Newsgroups | gmane.comp.php.pear.general |
|---|---|
| Message-ID | <[email protected]> |
Hi Christian, On 24.10.2013 10:37, Christian Weiske wrote: > I'm using HTTP_Request2 to do several consecutive HTTP requests (HEAD, > GET and POST) in Services_Linkback[1]. > > ... > > My solution is now to only use clones of the request object, because > the HTTP_Request2 doesn't offer a "reset" option. > > > Is this the correct solution, or is there a hidden reset method I > didn't see? Yes, it is the recommended approach: you pass a prototype HTTP_Request2 object with necessary configuration applied and later clone it to perform an actual HTTP request using specific data. > [1] https://github.com/pear2/Services_Linkback -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php