tirexs icon indicating copy to clipboard operation
tirexs copied to clipboard

Option to provide headers for request?

Open bglusman opened this issue 8 years ago • 2 comments

Apologies if this is out of scope or been discussed previously, I only spent a few minutes looking for how to do before deciding it does not appear to be supported currently.

We're using ElasticSearch on AWS and the queries need to be signed with our IAM credentials... planning to use https://github.com/bryanjos/aws_auth to do the signing, but it would be nice if the methods in HTTP module could take an optional headers hash to merge in to the request. Imagine others might benefit from this as well, I can even try and tackle adding it myself (doesn't look super hard), but thought I'd ask first to make sure a PR would be well received, or if there's any special guidelines for how you'd prefer it to be done (e.g. new methods vs optional param on existing methods?)

bglusman avatar Nov 09 '16 17:11 bglusman

It sounds good. Looking forward to review your PR.

Zatvobor avatar Nov 21 '16 17:11 Zatvobor

Thanks, sorry though decided to use a lighter weight library for now, may still PR it at sone point if I have time, but much lower priority :-/

bglusman avatar Nov 21 '16 17:11 bglusman