mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 20:20:53 +00:00
Update parameter names to match for Curl::post() and MultiCurl::addPost()
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user