We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f646e86 commit cf823beCopy full SHA for cf823be
crates/crates_io_docs_rs/src/lib.rs
@@ -44,7 +44,10 @@ pub struct RealDocsRsClient {
44
impl RealDocsRsClient {
45
pub fn new(base_url: impl IntoUrl, api_token: impl Into<String>) -> Result<Self, DocsRsError> {
46
Ok(Self {
47
- client: reqwest::Client::new(),
+ client: reqwest::Client::builder()
48
+ .user_agent("crates.io")
49
+ .build()
50
+ .unwrap(),
51
base_url: base_url
52
.into_url()
53
.map_err(|err| DocsRsError::Other(err.into()))?,
0 commit comments