I'm unable to access the GitHub API from Rust using the code here

Anyone got any idea? I always get a 403 error back, but the same request with `curl` works just fine.

It's driving me mad!

@musicmatze I only need to get the latest release of a private repo and I don't want to add another dependency if it can be avoided

@kevin so you get the same error when removing the authorization header and try it on a public repo?

Btw, as you usually like to keep things minimalistic. I can recommend you ureq or attohttpc for a more lightweight http client than reqwest.

@dnaka91 yes even when I use a public repo or I get a 403. It's super weird.

I'll check the other libraries!

@kevin I never used reqwest, but I used surf for accessing the github API in the past. I created a small example gist:

Note: this uses async rust

@fin_ger thanks! I guess now is as good as any time to get into async rust. Other crates I found also use Tokio for async so ... guess I can't push learning async any further :D

Sign in to participate in the conversation
Mastodon is a instance for everyone who is part of bullgit. 🎉