SteveWinward / GoogleSheetsWrapper

Google Sheets API .NET Wrapper Library
MIT License
48 stars 13 forks source link

Allow passing IHttpClientFactory to SheetHelper.Init to enable proxy support #19

Closed kasthack closed 1 year ago

kasthack commented 1 year ago

I'm not sure about the implementation(i.e. public API probably shouldn't expose a google-specific type), but this solved the issue for my workflow.

Maybe, the new overload should take built in System.Net.IWebProxy or System.Net.Http.HttpClientHandler parameter instead, and wrap it with a factory internally, but I'm not sure if it's future-proof and covers all edge cases.

SteveWinward commented 1 year ago

Thank you @kasthack for the contribution! I'm going to merge this into main and then update the release number to get this pushed into the next nuget release.