added http_response in callbacks for agent.js and catalog.js