Zach Borboa
bb1a190071
Use strict types
2021-07-26 00:48:18 -04:00
Zach Borboa
250421927f
Add additional Curl::set* and MultiCurl::set* helper methods
2021-06-17 11:14:29 -04:00
Zach Borboa
fe829855cb
Fix #670 : Add additional checks before attempting to close curl handles
2021-06-09 20:58:33 -04:00
Zach Borboa
06ca377f64
Add support for using relative urls with MultiCurl::add*() methods
...
This change allows setting a base url with MultiCurl and adding requests
using relative paths.
Fixes #628 .
2021-03-23 11:03:39 -04:00
Zach Borboa
57bfcb4e1a
Clean up
2021-03-22 22:55:46 -04:00
Zach Borboa
161f9aea63
Use short array syntax
2021-03-18 01:15:52 -04:00
Zach Borboa
e71ff2c56c
Use MultiCurl::startTime and MultiCurl::stopTime when generating request stats
2021-03-17 00:29:47 -04:00
Zach Borboa
a74b38821c
Set debugging message when rate limit assertions fail
2021-03-16 12:34:40 -04:00
Zach Borboa
79e7ddafb5
Fix tests as curl_init() and curl_multi_init() can return an object
...
As of PHP 8.0.0, curl_init() and curl_multi_init() return an object
instead of a resource. Update the tests to pass when the curl init
functions return either an object or a resource.
2021-03-13 20:32:20 -05:00
Zach Borboa
75adc83a5c
Add tests that expose the empty cookie jar after close bug
2021-03-13 18:18:15 -05:00
Zach Borboa
23e95578f8
Use helper function to simplify calculating request statistics
2021-03-13 17:30:13 -05:00
Zach Borboa
dbef40b16d
Clean up
2021-03-12 21:54:05 -05:00
Zach Borboa
9d4134b830
Use a helper function to access values of private class properties
2020-10-31 21:28:15 -07:00
Zach Borboa
3d8e4c38c2
Allow passing an indexed array to MultiCurl::setHeaders()
2020-10-31 14:59:35 -07:00
Zach Borboa
85c95b187c
Add rate limit test cases using uppercase letters for unit
2020-05-16 23:53:29 -07:00
Zach Borboa
b33bfb93ef
Clean up
2020-05-16 23:51:23 -07:00
Zach Borboa
976008d094
Implement rate limiting requests via MultiCurl::setRateLimit()
2020-05-16 22:01:15 -07:00
Zach Borboa
ab407d6b25
Implement disableTimeout()
...
Implement Curl::disableTimeout() and MultiCurl::disableTimeout()
2020-05-09 09:19:35 -07:00
Zach Borboa
ea66e3bfb9
Standardize the use import statements
2020-04-17 18:47:59 -07:00
Zach Borboa
82c0880ab5
Clean up
2020-01-14 20:56:42 -08:00
Zach Borboa
a020585a73
Fix #608 : Implement Curl::setRange() and MultiCurl::setRange()
2020-01-14 20:55:41 -08:00
Zach Borboa
1d0f6cfc84
Fix #609 : Implement Curl::setFile() and MultiCurl::setFile()
2020-01-14 20:36:19 -08:00
Zach Borboa
2d591c3b7c
Fix lingering temporary download file when using MultiCurl::addDownload() ( #602 )
2019-11-17 00:19:57 -08:00
Zach Borboa
c894feda9f
Add test cases for the SEARCH method
2019-05-22 23:49:22 -07:00
Zach Borboa
8598deaa6f
Clean up
2019-05-17 05:01:13 -07:00
Zach Borboa
9a538f3a6b
Reduce number of ops
2019-05-12 21:13:10 -07:00
Zach Borboa
0857023319
Fix #572,#582: Add MultiCurl::setProxies() to make multicurl requests with multiple proxies
2019-05-12 01:01:57 -07:00
Zach Borboa
494d8a75a2
Add additional tests for MultiCurl proxy functions
2019-05-11 23:26:10 -07:00
Zach Borboa
35a32a7a77
Fix #567 : Add proxy support for MultiCurl
2019-01-05 00:43:21 -08:00
Zach Borboa
26e6a966df
Add allowed error that occurs when running unit tests inside container
2018-07-28 13:40:33 -07:00
Zach Borboa
fddd222575
Add additional possible error
2018-05-20 02:47:13 -07:00
Zach Borboa
d736b5652b
Add assertion messages to display unexpected error codes
2018-05-20 02:46:43 -07:00
Zach Borboa
90f4552563
Fix failure tests erroring during continuous integration tests with mismatching error codes.
...
Fixes "Failed asserting that 28 matches expected 55."
2018-04-29 02:25:01 -07:00
Zach Borboa
027ee67373
Fix failure tests erroring with mismatching error codes.
...
Fixes "Failed asserting that 35 matches expected 28."
2018-04-29 01:47:55 -07:00
Zach Borboa
e240b43606
Fix #511 : Use correct body in POST requests that use empty data arrays.
...
This fixes JSON POST requests incorrectly sending a serialized empty
array "[]" instead of an empty request body by default.
2018-04-26 02:49:21 -07:00
Zach Borboa
40f7026185
Fix #493 : Build POST data correctly when headers have been set.
...
Call MultiCurl::queueHandle sooner so that headers are correctly set when Curl::buildPostData is called and builds POST data differently depending on the request content-type.
2018-01-26 00:58:37 -08:00
Zach Borboa
44c1539ba6
Fix decoders set on individual instances ignored
2018-01-25 22:49:57 -08:00
Zach Borboa
ce9ff3c7ec
Fix #347 : Add basic support for requests using relative paths
2017-10-09 19:30:36 -07:00
Zach Borboa
4ec89be9bc
Allow setRetry() methods to use callables
2017-09-02 02:23:40 -07:00
Zach Borboa
0f1e16a6fa
Implement MultiCurl::setRetry()
2017-08-31 01:26:42 -07:00
Zach Borboa
95041d6c49
Run Digest Access Authentication test on HHVM
2017-07-03 01:59:27 -07:00
Zach Borboa
2264362338
Clean up namespacing
2017-04-30 15:58:33 -07:00
Zach Borboa
8a374aa191
Update tests to run assertions before instances are cleaned up and properties are null.
2017-04-30 03:52:59 -07:00
Zach Borboa
fb1f36da16
Fix syntax error for PHP 5.3 and PHP 5.4.
...
Fixes "PHP Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in XXX on line XXX".
2017-04-29 03:29:24 -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
0996917ae0
Add assertions to fix "risky tests" warning
2017-03-20 01:42:15 -07:00
Zach Borboa
d9b5e3ebd5
Fix PHPUnit 6.0 release causing build to break.
...
Use PHPUnit's new namespacing.
Add shim for backwards compatibility and run on PHP < 7.0.
2017-03-18 04:25:48 -07: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
7b5dd71bd5
Implement MultiCurl::setCookies()
2016-12-23 00:20:51 -08:00
Zach Borboa
714d072a14
Mark skipped tests with PHPUnit markTestSkipped()
2016-11-12 08:41:23 -08:00