Skip to content

Allow custom Http client options#15

Open
rosswintle wants to merge 3 commits intorickwest:mainfrom
rosswintle:add-http-options
Open

Allow custom Http client options#15
rosswintle wants to merge 3 commits intorickwest:mainfrom
rosswintle:add-http-options

Conversation

@rosswintle
Copy link
Copy Markdown
Contributor

@rosswintle rosswintle commented Dec 6, 2023

Thanks for the awesome package!

I was using this locally and was getting curl errors:

cURL error 60: SSL certificate problem: unable to get local issuer certificate

After realising that I couldn't modify the verify option with a globalRequestMiddleware I decided to add a withOptions method to enable it.

I've updated the README accordingly.

Testing

I spent several hours (I know!) trying to find a way to test this, but with how I'm setting the options there does not seem to be a way that I could find. I source-dived, and xDebugged, but the option seems to be set on the curl instance and with the Fake I don't think we even get to that depth in the test.

I tried to create a mock, but this felt like we were just testing that the new method does what the new method does.

Happy to take your advice here.

Thanks.

@rosswintle rosswintle marked this pull request as ready for review December 9, 2023 15:40
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.

1 participant