-
Notifications
You must be signed in to change notification settings - Fork 559
New issue
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
Add a HTTP stream based HTTP client for environments that lack cURL. #124
Conversation
sometimes I want to override __call method for some reason. For example I always want to call say method with language option "'language' => 'ja-jp');".
Conflicts: Services/Twilio.php
@@ -87,7 +87,10 @@ public static function decamelize($word) | |||
* @return string | |||
*/ | |||
public static function camelize($word) { | |||
return preg_replace('/(^|_)([a-z])/e', 'strtoupper("\\2")', $word); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As written here, using the anonymous function breaks PHP 5.2 compatibility.
By using create_function - as in my pull request: #123 - we fix the /e issue and keep 5.2 compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can revert this then you can merge the other pull request - let me know what's best.
Testing complete, this is good. |
"header" => "Accept-Charset: utf-8\r\n", | ||
), | ||
"ssl" => array( | ||
'veryify_peer' => true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there's a typo here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As noted above. @sjlangley will fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
- Fix debug flag and print debug output if the flag is on.
As cURL is an optional extension not all host have it enabled.
This falls back to a http streams based approach to making HTTP requests is cURL is not detected.