elasticsearch/elasticsearch — pull request #7594 by javanna (2014-09-04 16:05:49+00:00)
Title: REST API: refactor copy headers mechanism

The functionality of copying headers in the REST layer (from REST requests to transport requests) remains the same. Made it a bit nicer by introducing a ClientFactory component that is a singleton and allows to register useful headers without requiring static methods.

Plugins just have to inject the ClientFactory now, and call its `addUsefulHeaders` method that is not static anymore.

Relates to #6513