跳转到内容

Polling

Polling auto-sends requests at a regular interval. Enable it by setting pollingInterval.

Basic Polling

When pollingInterval > 0, polling mode is active. Use pollingWhenDocumentHidden to control whether polling continues when the page is hidden (default false).

Polling Error Retry

pollingErrorRetryCount controls how many times to retry on polling errors (default 3).

API

PropertyTypeDefaultDescription
pollingIntervalMaybeRef<number>0Polling interval (ms), > 0 enables polling
pollingWhenDocumentHiddenMaybeRef<boolean>falseContinue polling when page is hidden
pollingErrorRetryCountMaybeRef<number>3Polling error retry count