Skip to content

Add curl option support in Image class#5

Merged
DantSu merged 2 commits intoDantSu:masterfrom
davetha:master
Nov 9, 2022
Merged

Add curl option support in Image class#5
DantSu merged 2 commits intoDantSu:masterfrom
davetha:master

Conversation

@davetha
Copy link
Copy Markdown
Contributor

@davetha davetha commented Aug 24, 2022

I'm primarily using php-image-editor because I've been testing out php-osm-static-api. I noticed a couple of things that could help with crafting curl requests, and handling failures. A great example where allowing failOnError is when you want to catch a URL that either isn't resolving, or returning a status that isn't 200.

My use case would be, if one image processing instance is down, allow fail over to another by using a try catch in my code.

This pull request contains the following for the reasons stated above.

  • Make it so the curl features of the library support a curl options array for things like timeouts, useragents, SSL Key checks etc.

  • Support fail on error for curl requests as well. The library didn't appear to have any way to bubble up a problem when the curl didn't succeed. $failOnError=true will throw an exception when there is an error.

davetha and others added 2 commits August 24, 2022 16:28
…array for things like timeouts, useragents, SSL Key checks etc.

- Support fail on error for curl requests as well.  The library didn't appear to have any way to bubble up a problem when the curl didn't succeed. $failOnError=true will throw an exception when there is an error.
@DantSu DantSu merged commit 98a450f into DantSu:master Nov 9, 2022
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