make it work with request >= 1.0.4