Fix rest URL and response code check.