We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
public static function send($method, $url, $body = null, $headers = array(), $username = null, $password = null) { self::$handle = curl_init();
if ($method !== Method::GET) { if ($method === Method::POST) { curl_setopt(self::$handle, CURLOPT_POST, true); } else { if ($method === Method::HEAD) { curl_setopt(self::$handle, CURLOPT_NOBODY, true); } curl_setopt(self::$handle, CURLOPT_CUSTOMREQUEST, $method); } // to accept array http_build_query must me used curl_setopt(self::$handle, CURLOPT_POSTFIELDS, http_build_query($body)); } elseif (is_array($body)) { if (strpos($url, '?') !== false) { $url .= '&'; } else { $url .= '?'; } $url .= urldecode(http_build_query(self::buildHTTPCurlQuery($body))); }
The text was updated successfully, but these errors were encountered:
This is a pretty critical issue.
Sorry, something went wrong.
No branches or pull requests
public static function send($method, $url, $body = null, $headers = array(), $username = null, $password = null)
{
self::$handle = curl_init();
The text was updated successfully, but these errors were encountered: