Commit Graph

309 Commits

Author SHA1 Message Date
Zach Borboa 0f1e16a6fa Implement MultiCurl::setRetry() 2017-08-31 01:26:42 -07:00
Zach Borboa 3c3741f891 Implement Curl::setRetry() 2017-08-30 01:36:13 -07:00
Zach Borboa 5b0bbb51cd Clean up 2017-08-24 23:55:01 -07:00
Dane Westvik cd08b5dee7 Support for urls with query parameters 2017-08-24 13:36:23 -07:00
Philipp Keck 9dada41203 Let all main request methods return mixed
Many of them have `string`, but that's not what `exec()` returns and at least when a response parser is used, the returned value is not a string, which confuses tools like type checkers.
2017-07-07 22:01:14 +02:00
Zach Borboa 0dcf0230ef Bump patch version 2017-06-27 16:57:16 -07:00
Zach Borboa b4d20d0f28 Fix #430: Close open file handle before renaming file affecting Windows 2017-06-27 01:59:26 -07:00
Zach Borboa eeaf3f9534 Clean up PSR-2 coding styles 2017-05-02 07:56:45 -07:00
Zach Borboa a0802b309d Clean up 2017-05-01 02:02:40 -07:00
Zach Borboa bcde6d9a54 Fix #265: Combine common cookie encoding into Curl::setEncodedCookie() and Curl::buildCookies(). 2017-05-01 01:48:13 -07:00
Zach Borboa 66d0afcb48 Bump minor version 2017-05-01 01:11:43 -07:00
Zach Borboa 2264362338 Clean up namespacing 2017-04-30 15:58:33 -07:00
Zach Borboa d21a7dcc8b Clean up completed multi curl instance to fix memory leak 2017-04-30 03:10:24 -07:00
Zach Borboa d214d6b767 Use temporary placeholder to store header callback data and avoid memory leak. 2017-04-30 02:52:45 -07:00
Zach Borboa 13ef3e4ef9 Reduce number of ops 2017-04-29 11:25:19 -07:00
Zach Borboa e0a6112375 Reduce number of ops 2017-04-29 11:21:28 -07:00
Zach Borboa efbcc080bb Allow the disabling of automatic response decoding.
The following will disable their respective decoders:

  $curl->setDefaultDecoder(false);
  $curl->setJsonDecoder(false);
  $curl->setXmlDecoder(false);
2017-04-29 02:54:35 -07:00
Zach Borboa 38f6825aa2 Replace variable function calls with call_user_func().
Fixes "Call to undefined function \Curl\Decoder::decodeXml()" in PHP
5.3, 5.4, 5.5, 5.6, hhvm.
2017-04-28 00:40:00 -07:00
Zach Borboa 97319a51f8 Move decoder functions to separate class file 2017-04-27 23:51:21 -07:00
Zach Borboa a6e94ae8bd Remove use of anonymous functions for json decoder and xml decoder 2017-04-27 02:41:45 -07:00
Zach Borboa 5aed969628 Add additional wait when curl_multi_select fails to block 2017-04-27 00:15:48 -07:00
Zach Borboa 658a10f013 Fix #441: Allow using string as well as array for query parameter argument 2017-04-25 23:53:33 -07:00
Zach Borboa 4fbfbd8ced Use instance's file handle 2017-03-20 01:20:27 -07:00
Zach Borboa 75edfe2ab1 Bump minor version 2017-01-26 23:49:43 -08:00
Zach Borboa 79f659d159 Fix probable bugs; Clean up style 2016-12-28 19:19:23 -08:00
Zach Borboa 7dc6eba0af Process multicurl requests in ascending numerical order.
Previously, multicurl requests were added to the end and removed from the end. Requests are now added to the end and
removed from the beginning. Using array_shift() will be slower than array_pop().

Before using "array_push()" + array_pop():
  1
  1 2
  1 2 3
  1 2 3 4
  1 2 3
  1 2
  1

After using "array_push()" + array_shift():
  1
  1 2
  1 2 3
  1 2 3 4
  2 3 4
  3 4
  4
2016-12-25 01:45:16 -05:00
Zach Borboa b6e6524d29 Move array methods to separate file 2016-12-24 13:04:12 -08:00
Zach Borboa bf701e7f3f Move large rfc variables down 2016-12-24 12:52:17 -08:00
Zach Borboa 7b5dd71bd5 Implement MultiCurl::setCookies() 2016-12-23 00:20:51 -08:00
Zach Borboa 296345b0a2 Implement Curl::setCookies() 2016-12-18 11:31:38 -08:00
Zach Borboa de1869b3ee Return boolean when calling setCookieFile() and setCookieJar() 2016-12-15 03:53:47 -08:00
Zach Borboa 07dee3e181 Bump minor version 2016-11-13 03:11:22 -08:00
Zach Borboa d6f4d1a8f6 Move rfc2616 and rfc6265 to deferred properties.
This avoids always calling array_fill_keys() for each new instance of Curl and
makes var_dump($curl); cleaner.
2016-11-12 08:57:58 -08:00
Zach Borboa 5cb05e956a Fix #405: Support resume for Curl::download() 2016-11-10 20:34:18 -08:00
Zach Borboa ed37de7d87 Fix #404: Allow calling Curl::getInfo() without option 2016-11-04 02:24:50 -07:00
Zach Borboa 5cb8223c47 Fix #400: Use sequential ids to allow for ordered post processing 2016-10-14 19:50:57 -07:00
Zach Borboa 97b24c65fa Return curl instance when calling MultiCurl::addCurl() like other MultiCurl::add*() methods 2016-10-12 08:24:45 -07:00
Kai Hempel e087f51c61 Add a curl add method for direct handle attach 2016-10-11 17:13:32 +02:00
Zach Borboa 459231fae7 Bump patch version 2016-09-27 00:35:34 -07:00
Zach Borboa df358fc425 Bump major version 2016-09-27 00:35:17 -07:00
Zach Borboa 15db0b95a3 Add syntax check exclusion; Clean up syntax 2016-09-27 00:28:57 -07:00
Zach Borboa ecdfa174cb Rename setURL to setUrl 2016-09-27 00:24:22 -07:00
Zach Borboa bfc868fab4 Remove foreach loops 2016-09-24 01:22:44 -07:00
Zach Borboa 36ad0e4ecf Implement setHeaders() 2016-09-24 01:15:27 -07:00
Zach Borboa cc23a1b29e Fix Curl::unsetHeader() 2016-09-24 01:02:04 -07:00
Zach Borboa 90b17385f6 Implement removeHeader(); unsetHeader now unsets existing header
removeHeader() removes an internal request header.
unsetHeader() now removes an extra header previously set using setHeader().
2016-09-24 00:09:55 -07:00
Zach Borboa af03a4b81e Add bytes to callback 2016-09-23 01:25:52 -07:00
Zach Borboa 4818885d3f Update available methods in readme 2016-09-23 01:17:55 -07:00
Zach Borboa 363a362bcd Fix #332: Implement Curl::setMaxFilesize() 2016-09-23 01:13:49 -07:00
Zach Borboa f26d659a89 Clean up 2016-09-22 23:54:10 -07:00