{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch-hadoop/issues/626","labels_url":"https://api.github.com/repos/elastic/elasticsearch-hadoop/issues/626/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch-hadoop/issues/626/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch-hadoop/issues/626/events","html_url":"https://github.com/elastic/elasticsearch-hadoop/issues/626","id":122451407,"number":626,"title":"Custom headers for http requests","user":{"login":"sstergou","id":1496466,"avatar_url":"https://avatars.githubusercontent.com/u/1496466?v=3","gravatar_id":"","url":"https://api.github.com/users/sstergou","html_url":"https://github.com/sstergou","followers_url":"https://api.github.com/users/sstergou/followers","following_url":"https://api.github.com/users/sstergou/following{/other_user}","gists_url":"https://api.github.com/users/sstergou/gists{/gist_id}","starred_url":"https://api.github.com/users/sstergou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sstergou/subscriptions","organizations_url":"https://api.github.com/users/sstergou/orgs","repos_url":"https://api.github.com/users/sstergou/repos","events_url":"https://api.github.com/users/sstergou/events{/privacy}","received_events_url":"https://api.github.com/users/sstergou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-12-16T08:21:46Z","updated_at":"2016-01-30T19:39:50Z","closed_at":null,"body":"Amazon provides an elasticsearch service that I am using http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/what-is-amazon-elasticsearch-service.html through spark.\r\n\r\nFor security reasons each request much be signed http://docs.aws.amazon.com/elasticsearch-service/latest/developerguide/what-is-amazon-elasticsearch-service.html#signing-requests and http://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html. It would be nice if I could define the custom headers that amazon requires for each request whenever I call the service from spark."},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch-hadoop/issues/comments/177282072","html_url":"https://github.com/elastic/elasticsearch-hadoop/issues/626#issuecomment-177282072","issue_url":"https://api.github.com/repos/elastic/elasticsearch-hadoop/issues/626","id":177282072,"user":{"login":"sstergou","id":1496466,"avatar_url":"https://avatars.githubusercontent.com/u/1496466?v=3","gravatar_id":"","url":"https://api.github.com/users/sstergou","html_url":"https://github.com/sstergou","followers_url":"https://api.github.com/users/sstergou/followers","following_url":"https://api.github.com/users/sstergou/following{/other_user}","gists_url":"https://api.github.com/users/sstergou/gists{/gist_id}","starred_url":"https://api.github.com/users/sstergou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sstergou/subscriptions","organizations_url":"https://api.github.com/users/sstergou/orgs","repos_url":"https://api.github.com/users/sstergou/repos","events_url":"https://api.github.com/users/sstergou/events{/privacy}","received_events_url":"https://api.github.com/users/sstergou/received_events","type":"User","site_admin":false},"created_at":"2016-01-30T19:39:50Z","updated_at":"2016-01-30T19:39:50Z","body":"A nice way to implement this is to use an [interceptor](https://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/HttpRequestInterceptor.html) for the apache http client. Unfortunately this feature is not available for the old 3.0.1 client which is forced as a dependency. I suppose that there is a reason behind that but would it be possible to update the http client with out breaking anything?"}}