restructe two http response handler