Refactored setRequestHeader to reduce the complexity
Merge pull request #45 from stof/simplify_request_header

Refactored setRequestHeader to reduce the complexity