Restore lastRequest and lastResponse for debugging. Render XML only once. Close curl handle after request.