Skip to content
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

Closed
wants to merge 16 commits into from

Conversation

sjlangley
Copy link
Contributor

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.

@@ -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);
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@caseysoftware
Copy link
Contributor

Testing complete, this is good.
I'm 100% in favor of merging this pull request given my two notes above.

"header" => "Accept-Charset: utf-8\r\n",
),
"ssl" => array(
'veryify_peer' => true,
Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants