fix response encoding support (#276)

@mattenp I'll merge this in master once confirmed the fix works for you.