Share via


CreateHttpPollerOptions interface

Options for createPoller.

Properties

baseUrl

The base URL to use when making requests.

intervalInMs

Defines how much time the poller is going to wait before making a new request to the service.

processResult

A function to process the result of the LRO.

resolveOnUnsuccessful

Control whether to throw an exception if the operation failed or was canceled.

resourceLocationConfig

The potential location of the result of the LRO if specified by the LRO extension in the swagger.

restoreFrom

A serialized poller which can be used to resume an existing paused Long-Running-Operation.

skipFinalGet

A flag to skip the final GET request that would normally fetch the final resource

updateState

A function to process the state of the LRO.

withOperationLocation

A function to be called each time the operation location is updated by the service.

Property Details

baseUrl

The base URL to use when making requests.

baseUrl?: string

Property Value

string

intervalInMs

Defines how much time the poller is going to wait before making a new request to the service.

intervalInMs?: number

Property Value

number

processResult

A function to process the result of the LRO.

processResult?: (result: unknown, state: TState) => Promise<TResult>

Property Value

(result: unknown, state: TState) => Promise<TResult>

resolveOnUnsuccessful

Control whether to throw an exception if the operation failed or was canceled.

resolveOnUnsuccessful?: boolean

Property Value

boolean

resourceLocationConfig

The potential location of the result of the LRO if specified by the LRO extension in the swagger.

resourceLocationConfig?: ResourceLocationConfig

Property Value

restoreFrom

A serialized poller which can be used to resume an existing paused Long-Running-Operation.

restoreFrom?: string

Property Value

string

skipFinalGet

A flag to skip the final GET request that would normally fetch the final resource

skipFinalGet?: boolean

Property Value

boolean

updateState

A function to process the state of the LRO.

updateState?: (state: TState, response: OperationResponse<unknown, RawRequest>) => void

Property Value

(state: TState, response: OperationResponse<unknown, RawRequest>) => void

withOperationLocation

A function to be called each time the operation location is updated by the service.

withOperationLocation?: (operationLocation: string) => void

Property Value

(operationLocation: string) => void