pass request object to encoder so encoder can make decisions based on re...

...quest specific factors (like url args)