Using NULL produce the same result (no header is sent) and NA sends 'NA' as a header value. I found a similar issue (though I lost it sorry) with POST, the suggestion was to use encode = 'raw' though this does not solve the issue:
httr has been superseded in favour of httr2, so is no longer under active development. If this problem is still important to you in httr2, I'd suggest filing an issue offer there 😄. Thanks for using httr!
How can I use
httr::GET
to send empty headers?The documentation for
add_header
says:For example, a 'normal' header:
Empty header is not sent because it is unset:
Using
NULL
produce the same result (no header is sent) andNA
sends 'NA' as a header value. I found a similar issue (though I lost it sorry) with POST, the suggestion was to useencode = 'raw'
though this does not solve the issue: