Fixes for the HttpClient issue that it will redirect when received statuscode 302