# pullPiecesPollingHandler

> **pullPiecesPollingHandler**(`pendingCount`, `finalResponse`, `options?`): `HttpHandler`

Defined in: [packages/synapse-core/src/mocks/pdp.ts:399](https://github.com/FilOzone/synapse-sdk/blob/3c73314ba050f6fe51c888cb971d745c539028e2/packages/synapse-core/src/mocks/pdp.ts#L399)

Creates a handler that simulates polling, returns pending status N times,
then returns the final response

## Parameters

| Parameter | Type |
| ------ | ------ |
| `pendingCount` | `number` |
| `finalResponse` | [`ReturnType`](/reference/filoz/synapse-core/sp/namespaces/pullpiecesapirequest/type-aliases/returntype/) |
| `options?` | [`PDPMockOptions`](/reference/filoz/synapse-core/mocks/namespaces/pdp/interfaces/pdpmockoptions/) |

## Returns

`HttpHandler`