The mechanism implemented for this has two purposes:
It maintains backwards compatibility
It allows reusing the same client amongst slightly different "configurations". This allows you to have one single http client in multitenant applications with different authentication headers.
You can see a silly proof of concept below to illustrate how different requests can tweak the header slightly different while reusing the same TCP socket for performance reasons:
The purpose of this PR is to allow users of this library to modify the outgoing request. It is useful as it allows you to set authentication headers without having to write a custom http client (ref. https://github.com/shurcooL/graphql/issues/28#issuecomment-464713908)
The mechanism implemented for this has two purposes:
You can see a silly proof of concept below to illustrate how different requests can tweak the header slightly different while reusing the same TCP socket for performance reasons: