diff --git a/README.md b/README.md index 0e88e80..a502952 100644 --- a/README.md +++ b/README.md @@ -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() diff --git a/src/Curl/MultiCurl.php b/src/Curl/MultiCurl.php index 12e0a20..2a9fd26 100644 --- a/src/Curl/MultiCurl.php +++ b/src/Curl/MultiCurl.php @@ -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'); }