handle response at the right level. --- Adding redirection support.