rust-cookbook icon indicating copy to clipboard operation
rust-cookbook copied to clipboard

querying-the-web-api examples don't work due to missing user-agent-headers

Open suren-m opened this issue 3 years ago • 2 comments
trafficstars

Fixed runtime decoding error occurring due to 403 responses from gh api because of missing user-agent header

fixes #662

Feel free to close if you still prefer to use reqwest::get for the example but with a different api that doesn't require user-agent-header. I'm currently unaware of how to pass headers along with reqwest::get and thus used a reqwest client in the fix

suren-m avatar Apr 01 '22 18:04 suren-m

Ran into the same issue. Thanks for writing this up. Worked like a charm. I wish it was already merged ;)

toanju avatar May 01 '22 19:05 toanju

Also hit the same thing and this is better work than I came up with :)

tompscanlan avatar Oct 30 '22 03:10 tompscanlan