Skip to content

Commit

Permalink
make customHTTPClient public
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-basiuk committed Feb 5, 2024
1 parent e72b4f4 commit 5af1576
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions resolvers/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func GetSenderDID(ctx context.Context) *w3c.DID {
// AgentResolverConfig options for credential status verification
type AgentResolverConfig struct {
PackageManager *iden3comm.PackageManager
customHTTPClient *http.Client
CustomHTTPClient *http.Client
}

// AgentResolver is a struct that allows to interact with the issuer's agent to get revocation status.
Expand Down Expand Up @@ -99,11 +99,9 @@ func (r AgentResolver) Resolve(ctx context.Context,
return out, errors.WithStack(err)
}

var httpClient *http.Client
if r.config.customHTTPClient != nil {
httpClient = r.config.customHTTPClient
} else {
httpClient = http.DefaultClient
httpClient := http.DefaultClient
if r.config.CustomHTTPClient != nil {
httpClient = r.config.CustomHTTPClient
}

resp, err := httpClient.Post(status.ID, "application/json", bytes.NewBuffer(iden3commMsg))
Expand Down

0 comments on commit 5af1576

Please sign in to comment.