Skip to content

Add custom http handler and auth provider interface #9

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

Merged
merged 4 commits into from
Apr 20, 2025

Conversation

hyprh
Copy link
Contributor

@hyprh hyprh commented Apr 18, 2025

Change:

  1. Add custom http request handler option.
  2. Add Auth Provider interface FillRequestKey to inject auth token for custom request handler.

Copy link

github-actions bot commented Apr 18, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@hyprh
Copy link
Contributor Author

hyprh commented Apr 18, 2025

I have read the CLA Document and I hereby sign the CLA

@hyprh hyprh closed this Apr 18, 2025
@hyprh hyprh reopened this Apr 18, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Apr 18, 2025
@trpc-group trpc-group unlocked this conversation Apr 18, 2025
@hyprh hyprh force-pushed the master branch 2 times, most recently from 02887a3 to 25d9b99 Compare April 19, 2025 03:29
@@ -17,6 +18,11 @@ import (
// Option is a functional option type for configuring the A2AClient.
type Option func(*A2AClient)

// HttpReqHandler is a custom HTTP request handler for a2a client.
type HttpReqHandler interface {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Http => HTTP

@@ -95,3 +101,10 @@ func WithAuthProvider(provider auth.ClientProvider) Option {
c.httpClient = provider.ConfigureClient(c.httpClient)
}
}

// WithHttpReqHandler sets a custom HTTP request handler for the A2AClient.
func WithHttpReqHandler(handler HttpReqHandler) Option {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Http => HTTP

@WineChord WineChord merged commit ba199b7 into trpc-group:main Apr 20, 2025
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants