-
Notifications
You must be signed in to change notification settings - Fork 374
Open
Copy link
Labels
needs community feedbackMore input from users needed to inform a decisionMore input from users needed to inform a decision
Description
Following up on #522, where we discussed making it easier to modify HTTP client transport requests, for example by adding headers, we propose the following two new options:
type StreamableClientTransport struct {
...
// If set, ModifyRequest is called before each outgoing HTTP request made by the client
// connection. It can be use to, for example, add headers to outgoing requests.
ModifyRequest func(*http.Request)
}
type SSEClientTransport struct {
...
// <ditto>
ModifyRequest func(*http.Request)
}We believe these options will make it easier to do things like add auth headers. Currently, this can be achieved using the HTTPClient field, but only in the roundtripper, which requires cloning the request.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs community feedbackMore input from users needed to inform a decisionMore input from users needed to inform a decision