Skip to content

Commit

Permalink
Rename setProxyOption method to SetProxy
Browse files Browse the repository at this point in the history
  • Loading branch information
alihesari committed Oct 5, 2018
1 parent bac1a0c commit b7feb92
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Telegram/Api.php
Expand Up @@ -372,10 +372,11 @@ public static function replyKeyboard($buttons)
}

/**
* Proxy Options
* Set Proxy
*
* @return array
*/
public static function setProxyOptions()
public static function setProxy()
{
return [
CURLOPT_PROXY => Config::get('hostname' , '127.0.0.1'),
Expand Down Expand Up @@ -404,7 +405,7 @@ public static function sendRequest($method = 'sendMessage', $params)
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);

if(self::$proxy){
curl_setopt_array($curl, self::setProxyOptions());
curl_setopt_array($curl, self::setProxy());
}

$curl_result = curl_exec($curl);
Expand All @@ -421,4 +422,4 @@ public static function sendRequest($method = 'sendMessage', $params)

return $curl_result;
}
}
}

0 comments on commit b7feb92

Please sign in to comment.