You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use the search function on Registry with the host "https://crates.io" Steps
A new rust project
Create a registry with Registry::new()
Use the search function
Possible Solution(s)
Notes
This is what my code is use crates_io::*; fn main() { let mut crates = Registry::new(String::from("https://crates.io"), None); let mut query = crates.search("clap",10).unwrap(); }
Also, this is the panic message:
thread 'main' panicked at 'called Result::unwrap() on an Err value: failed to get a 200 OK response, got 403
headers:
HTTP/2 403
body:
We require that all requests include a User-Agent header. To allow us to determine the impact your bot has on our service, we ask that your user agent actually identify your bot, and not just report the HTTP client library you're using. Including contact information will also reduce the chance that we will need to take action against your bot.
Problem
When I use the search function on Registry with the host "https://crates.io"
Steps
Possible Solution(s)
Notes
This is what my code is
use crates_io::*; fn main() { let mut crates = Registry::new(String::from("https://crates.io"), None); let mut query = crates.search("clap",10).unwrap(); }
Also, this is the panic message:
thread 'main' panicked at 'called
Result::unwrap()
on anErr
value: failed to get a 200 OK response, got 403headers:
HTTP/2 403
body:
We require that all requests include a
User-Agent
header. To allow us to determine the impact your bot has on our service, we ask that your user agent actually identify your bot, and not just report the HTTP client library you're using. Including contact information will also reduce the chance that we will need to take action against your bot.Bad:
User-Agent: reqwest/0.9.1
Better:
User-Agent: my_crawler
Best:
User-Agent: my_crawler (my_crawler.com/info)
User-Agent: my_crawler (help@my_crawler.com)
If you believe you've received this message in error, please email help@crates.io and include the request id b8cb398a-10fb-4152-99f4-5e1a74571b02.
Output of
cargo version
:cargo 1.47.0 (f3c7e06 2020-08-28)
macos big sur
x64
The text was updated successfully, but these errors were encountered: