onPrepareRequest functional I hope. Repeating code separated to new method