Please describe the feature you’d like to see added.
Following #32540 (comment), I would like to add support for the HTTP Accept
header, in addition to current “suffix-based” data format detection:
https://github.com/bitcoin/bitcoin/blob/87ec923d3a7af7b30613174b41c6fb11671df466/src/rest.cpp#L137-L160
WDYT?
Describe the solution you’d like
I would suggest checking the HTTP request Accept
header, and using it to if there is no suffix set:
I wonder about just adding a content-type like option so that the api endpoint is the same but you simply say if you want binary or json content returned?