Invalid accept header
Closed this issue · 2 comments
aumer-amr commented
By default it seems reqwest
doesn't specify a correct Accept header, therefore some feeds return the incorrect format.
Example / reproduce:
- Use
url = "https://github.com/onedr0p/flux-cluster-template/commits/main/.atom"
- It will fail because it returns a JSON format (blame github).
Possible fix:
- Setting
.header(reqwest::header::ACCEPT, "application/atom+xml")
on the request will return xml properly, yes this probably won't work with other feed types.
My rust isn't good enough for a full PR, but hopefully this might help or steer in the right direction.
onedr0p commented
I think this might require a new config option to allow people to set request headers.