# pullPiecesPerPieceHandler

> **pullPiecesPerPieceHandler**(`statusFor`, `captureCallback?`, `options?`): `HttpHandler`

Defined in: [packages/synapse-core/src/mocks/pdp.ts:473](https://github.com/FilOzone/synapse-sdk/blob/5989c4b03ed2fe4cf8b1ef29efe1d4ff1ad4c7bc/packages/synapse-core/src/mocks/pdp.ts#L473)

Creates a handler that answers each requested piece with its own status, like Curio does for a batched pull.
The overall status follows Curio's rules (see `overallPullStatus`). Like Curio, it answers 400 when a
request repeats a PieceCID.

## Parameters

| Parameter | Type |
| ------ | ------ |
| `statusFor` | (`pieceCid`) => [`PullStatus`](/reference/filoz/synapse-core/sp/namespaces/pullpiecesapirequest/type-aliases/pullstatus/) |
| `captureCallback?` | (`request`) => `void` |
| `options?` | [`PDPMockOptions`](/reference/filoz/synapse-core/mocks/namespaces/pdp/interfaces/pdpmockoptions/) |

## Returns

`HttpHandler`