Update parameter names to match for Curl::post() and MultiCurl::addPost()

This commit is contained in:
Zach Borboa
2016-07-04 11:11:54 -07:00
parent 3be4865f1b
commit 74f9d0fa37
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -212,7 +212,7 @@ Curl::head($url, $data = array())
Curl::headerCallback($ch, $header)
Curl::options($url, $data = array())
Curl::patch($url, $data = array())
Curl::post($url, $data = array(), $post_redirect_get = false)
Curl::post($url, $data = array(), $follow_303_with_post = false)
Curl::progress($callback)
Curl::put($url, $data = array())
Curl::setBasicAuthentication($username, $password = '')
@@ -249,7 +249,7 @@ MultiCurl::addGet($url, $data = array())
MultiCurl::addHead($url, $data = array())
MultiCurl::addOptions($url, $data = array())
MultiCurl::addPatch($url, $data = array())
MultiCurl::addPost($url, $data = array(), $post_redirect_get = false)
MultiCurl::addPost($url, $data = array(), $follow_303_with_post = false)
MultiCurl::addPut($url, $data = array())
MultiCurl::beforeSend($callback)
MultiCurl::close()
+4 -4
View File
@@ -191,16 +191,16 @@ class MultiCurl
* @access public
* @param $url
* @param $data
* @param $post_redirect_get If true, will cause 303 redirections to be followed using
* @param $follow_303_with_post If true, will cause 303 redirections to be followed using
* GET requests (default: false).
* Note: Redirections are only followed if the CURLOPT_FOLLOWLOCATION option is set to true.
*
* @return object
*/
public function addPost($url, $data = array(), $post_redirect_get = false)
public function addPost($url, $data = array(), $follow_303_with_post = false)
{
if (is_array($url)) {
$post_redirect_get = (bool)$data;
$follow_303_with_post = (bool)$data;
$data = $url;
$url = $this->baseUrl;
}
@@ -217,7 +217,7 @@ class MultiCurl
* For post-redirect-get requests, the CURLOPT_CUSTOMREQUEST option must not
* be set, otherwise cURL will perform POST requests for redirections.
*/
if (!$post_redirect_get) {
if (!$follow_303_with_post) {
$curl->setOpt(CURLOPT_CUSTOMREQUEST, 'POST');
}