Improvement: added additional function parameter to allow to modify request headers