Closed ostrobrod closed 5 years ago
Thanks! I have questions, though:
At first glance, this seems extremely specialized to be worth making part of the API and maybe a more generic approach with customizing the HTTP request object would make more sense -- but maybe I'm missing something.
Does Sparkle (for Mac) has anything similar?
Yes, Sparkle for Mac has a property of SUUpdater httpHeaders
. Using that property you are allowed to add some additional field to HTTP header. In my case, I need send some additional information about a user to the server (this information is used for licensing).
In my case, I need send some additional information about a user to the server (this information is used for licensing).
Ah, that makes a lot of sense, thanks for the explanation!
Thanks, merged in 506c0b21b35b9f524e775344327bbd1e3a484d02 and 0c34819f2770e273acd34b1c6634e4d2bdaf0ca5 after some slight cleanup (and small API change, to use win_sparkle_set_http_header()
instead of "add", in another commit).
Here is implemented setup of custom HTTP headers.
Two functions were added in API:
win_sparkle_add_http_header
adds new header parameter.win_sparkle_clear_http_headers
clear all custom header parameters.Header storage is implemented as
std::wstring
.