Skip to content

pullPiecesPerPieceHandler

pullPiecesPerPieceHandler(statusFor, captureCallback?, options?): HttpHandler

Defined in: packages/synapse-core/src/mocks/pdp.ts:473

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.

Parameter Type
statusFor (pieceCid) => PullStatus
captureCallback? (request) => void
options? PDPMockOptions

HttpHandler