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

Support for proxy on curl request #185

Merged
merged 8 commits into from Aug 8, 2018

Conversation

Projects
None yet
3 participants
@msnassar
Copy link
Contributor

commented Aug 3, 2018

PR for #184

NASSAR Mohammed (DIGIT-EXT) and others added some commits Aug 3, 2018

Merge pull request #1 from msnassar/proxy-config
Add proxy support for array configs on curl request
Merge pull request #2 from msnassar/proxy-config
Add proxy support for env configs on curl request
Merge pull request #3 from msnassar/proxy-config
Update the readme, Add proxy configs
*/
public function getProxyServer()
{
return $this->proxyServer;

This comment has been minimized.

Copy link
@Nitpick-CI

Nitpick-CI Aug 3, 2018

Line indented incorrectly; expected at least 8 spaces, found 6

*/
public function getProxyPort()
{
return $this->proxyPort;

This comment has been minimized.

Copy link
@Nitpick-CI

Nitpick-CI Aug 3, 2018

Line indented incorrectly; expected at least 8 spaces, found 6

*/
public function getProxyUser()
{
return $this->proxyUser;

This comment has been minimized.

Copy link
@Nitpick-CI

Nitpick-CI Aug 3, 2018

Line indented incorrectly; expected at least 8 spaces, found 6

*/
public function getProxyPassword()
{
return $this->proxyPassword;

This comment has been minimized.

Copy link
@Nitpick-CI

Nitpick-CI Aug 3, 2018

Line indented incorrectly; expected at least 8 spaces, found 6

@@ -208,6 +208,16 @@ public function exec($context, $post_data = null, $custom_request = null, $cooki
curl_setopt($ch, CURLOPT_VERBOSE, $this->getConfiguration()->isCurlOptVerbose());
// Add proxy settings to the curl.
if ($this->getConfiguration()->getProxyServer()) {
curl_setopt($ch, CURLOPT_PROXY, $this->getConfiguration()->getProxyServer());

This comment has been minimized.

Copy link
@Nitpick-CI

Nitpick-CI Aug 3, 2018

Line indented incorrectly; expected at least 12 spaces, found 10

// Add proxy settings to the curl.
if ($this->getConfiguration()->getProxyServer()) {
curl_setopt($ch, CURLOPT_PROXY, $this->getConfiguration()->getProxyServer());
curl_setopt($ch, CURLOPT_PROXYPORT, $this->getConfiguration()->getProxyPort());

This comment has been minimized.

Copy link
@Nitpick-CI

Nitpick-CI Aug 3, 2018

Line indented incorrectly; expected at least 12 spaces, found 10

curl_setopt($ch, CURLOPT_PROXY, $this->getConfiguration()->getProxyServer());
curl_setopt($ch, CURLOPT_PROXYPORT, $this->getConfiguration()->getProxyPort());
$username = $this->getConfiguration()->getProxyUser();

This comment has been minimized.

Copy link
@Nitpick-CI

Nitpick-CI Aug 3, 2018

Line indented incorrectly; expected at least 12 spaces, found 10

curl_setopt($ch, CURLOPT_PROXYPORT, $this->getConfiguration()->getProxyPort());
$username = $this->getConfiguration()->getProxyUser();
$password = $this->getConfiguration()->getProxyPassword();

This comment has been minimized.

Copy link
@Nitpick-CI

Nitpick-CI Aug 3, 2018

Line indented incorrectly; expected at least 12 spaces, found 10

$username = $this->getConfiguration()->getProxyUser();
$password = $this->getConfiguration()->getProxyPassword();
curl_setopt($ch, CURLOPT_PROXYUSERPWD, "$username:$password");

This comment has been minimized.

Copy link
@Nitpick-CI

Nitpick-CI Aug 3, 2018

Line indented incorrectly; expected at least 12 spaces, found 10

@lesstif

This comment has been minimized.

Copy link
Owner

commented Aug 3, 2018

Thanks.
Could you please to squash these before I merge?

Mohammed and others added some commits Aug 5, 2018

@msnassar

This comment has been minimized.

Copy link
Contributor Author

commented Aug 5, 2018

@lesstif Thanks for the review
I fixed the coding standards

@lesstif lesstif merged commit bd90774 into lesstif:master Aug 8, 2018

3 checks passed

Scrutinizer 4 new issues, 4 updated code elements
Details
continuous-integration/styleci/pr The analysis has passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.