--header option to pass additional HTTP headers
This is updated version of https://patchwork.ozlabs.org/project/openwrt/patch/CADR0UcUXJS4DkSSR_0-ZKhdEOaOwUn09WpJDpG9NMRYNsjQ8Sw@mail.gmail.com/#2351683
It's needed to make some API calls to pass Authorization: Bearer
or to pass If-Modified-Since
(to imitate wget -N) and others.
ACME needs for it https://github.com/acmesh-official/acme.sh/issues/1768
busybox wget also has the --header
option.
Some headers like Authorization
or User-Agent
may be already set by uclient-fetch itself. We may override them but to do this we'll need to add some code. Not so many but it's just a protection from user itself so to keep binary smaller I not added the logic.