fix depreciated HttpResponse object