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

Allow settings to override many cURL options #474

Merged
merged 1 commit into from
Feb 11, 2022

Conversation

stevecoug
Copy link
Contributor

Users may want to override some of the defaults in the Embed\Embed cURL client. For example, by default the client disables SSL certification validation, but many users will want to override that and enable it. Others may want to reduce the timeouts.

@oscarotero
Copy link
Owner

This can be done already:

$curl = new Embed\Http\CurlClient();
$curl->setSettings([ "max_redirs" => 2 ]);

$crawler = new Embed\Http\Crawler($curl);
$embed = new Embed\Embed($crawler);

@stevecoug
Copy link
Contributor Author

I'm pretty sure it can't. See https://github.com/oscarotero/Embed/blob/master/src/Http/CurlDispatcher.php, it has all of those values hard coded.

@oscarotero oscarotero merged commit f721b90 into oscarotero:master Feb 11, 2022
@oscarotero
Copy link
Owner

You're right, sorry. Thanks!

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.

2 participants