NetSparkle icon indicating copy to clipboard operation
NetSparkle copied to clipboard

Support headers when downloading appcast

Open emazv72 opened this issue 10 months ago • 2 comments

I just migrated fom Winsparkle because I needed fine grained control over download and it worked like a charm. However I noticed a little feature which helped me to figure out users how many users didn't upgrade yet. WinSparke used to set the user agent with the app name and version for the appcast get request. Would you mind adding a property to set the headers to pass to the inner HttpClient so achieve the same feature?

emazv72 avatar Mar 25 '25 08:03 emazv72

Hi @emazv72, glad the lib is helpful to you.

You can achieve what you'd like to do by subclassing WebFileDownloader and overriding the method protected virtual HttpClient CreateHttpClient(HttpClientHandler? handler) to return an HttpClient with whatever headers and other information you would like to send. You can do the same with the WebRequestAppCastDataDownloader class.

Deadpikle avatar Mar 25 '25 09:03 Deadpikle

Hi @Deadpikle, thank you for your helpful lib, appreciate your suggestion. I just thought it would be nice to have a simple pass through feature without having to deal with the lib inner machinery.

emazv72 avatar Mar 25 '25 09:03 emazv72