redirect implementation in http request