-
Notifications
You must be signed in to change notification settings - Fork 290
use HttpClient in azure_identity #785
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The flows probably need some manual testing.
@@ -89,43 +107,54 @@ impl TokenCredential for ImdsManagedIdentityCredential { | |||
_ => (), | |||
} | |||
|
|||
let msi_endpoint_url = Url::parse_with_params(&msi_endpoint, &query_items).context( | |||
let url = Url::parse_with_params(&msi_endpoint, &query_items).context( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may wish to switch to Url
instead of http::Uri
for its query parameters support.
I would appreciate a review of this. |
client: reqwest::Client, | ||
http_client: &dyn HttpClient, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels weird from the consumer side, given the client we get from new_http_client
is a Arc<dyn HttpClient>
. In other areas in the API, we use .clone()
instead of .as_ref()
, which feels slightly more natural.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that, this LGTM and works in all of my use cases.
The main goal of this PR is to move
reqwest
out ofdependencies
todev-dependencies
inazure_identity
.