-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
Description
Summary:
Modify the Python SDK's HTTP request wrapper to allow users to define custom headers when instantiating the client. These headers should be stored in the connection module and automatically appended to every request.
Description:
Currently, the SDK does not support user-defined headers globally across requests. This change will introduce a parameter to the client initialization, allowing users to specify custom headers. These headers should be stored in the connection object and merged with per-request headers before sending a request.
Requires:
- Add a
custom_headersparameter to the client constructor. - Store
custom_headersin the connection module. - Modify the request wrapper to merge
custom_headerswith per-request headers. - Ensure that per-request headers override global headers when there is a conflict.
- Update documentation and examples.
Considerations:
- Should we allow modification of headers after the client is instantiated?
- We must handle headers like
Authorizationthat already exist in SDK-generated requests.
Reactions are currently unavailable