Skip to content
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

feat: add optional HttpClient to allow mocking #64

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

ethan-tbd
Copy link
Contributor

allows other functions that rely on DidResolver to mock out the getUrl responses that are within DidDht and DidWeb resolve() functions

@ethan-tbd
Copy link
Contributor Author

will merge first, but curious to hear your opinion on this change @mistermoe

@ethan-tbd ethan-tbd merged commit 3b7c7c3 into main Apr 23, 2024
1 check failed
@ethan-tbd ethan-tbd deleted the add-did-resolver-client branch April 23, 2024 02:50
@@ -60,7 +61,8 @@ class DidJwk {
/// an invalid [DidResolutionResult].
///
/// Throws [FormatException] if the JWK parsing fails.
static Future<DidResolutionResult> resolve(Did did) async {
static Future<DidResolutionResult> resolve(Did did,
{HttpClient? client}) async {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm feels odd here because not all resolvers need http clients

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants