Is it possible to set default headers for boto requests? Basically I want to include a couple of headers in every API call I make to S3.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Right now, extra headers have to be specified on each request. The various methods of the bucket and key class all take an optional headers parameter and the contents of that dict gets merged into the request headers.
Being able to specify extra headers at the bucket level and then have those merged into all requests automatically sounds like a great feature. I’ll add that to boto in the near future.