-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add custom request headers #2050
Comments
@glonlas - Thank you for your post. Marking this as feature request. Currently you can inject custom headers to an api call by registering it with boto3 events. Here is the link to the documentation with example: Hope it helps. |
Greetings! It looks like this issue hasn’t been active in longer than one year. We encourage you to check if this is still an issue in the latest release. In the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or upvote with a reaction on the initial post to prevent automatic closure. If the issue is already closed, please feel free to open a new one. |
Hi, I'd like to have this feature request re-opened as it is indeed possible to add headers to a request, but I want to set a different header with each call, which I don't think is possible as of now with the current extensibility mechanism. I.e. It seems to be possible to register a handler to an event, but I haven't found a way to pass extra information to this handler at runtime upon each invocation. |
Yes, this would be very useful. Unfortunately, this issue got passed off from boto/boto3#2889 (with quite a bit of interest) then died here... |
Is your feature request related to a problem? Please describe.
Botocore seems to not support custom headers yet. For some application we will need additional headers like
X-Amz-Date
,Accept-Encoding
,Connection
, and so on.Describe the solution you'd like
I would like to propose a pull-request adding to extend JSONSerializer#serialize_to_request with the ability to receive custom headers via a Serializer attribute (Dict) we can customize. So applications using Botocore can decide what additional headers they want/need.
This will increase Botocore's flexibility.
Is there any concern about such a new feature?
The text was updated successfully, but these errors were encountered: