-
Notifications
You must be signed in to change notification settings - Fork 360
Open
Copy link
Labels
needs decisionNeeds a decision on how to proceedNeeds a decision on how to proceed
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 decisionNeeds a decision on how to proceedNeeds a decision on how to proceed