Skip to content

fetchPieces

function fetchPieces(options): Promise<SPFetchResponse>;

Defined in: packages/synapse-core/src/sp-fetch.ts:145

Initiate a piece fetch request or get status of an existing one.

POST /pdp/piece/fetch

This endpoint is idempotent, calling with the same extraData returns the status of the existing fetch rather than creating duplicates. This allows safe retries and status polling using the same request.

ParameterTypeDescription
optionsSPFetchPiecesOptionsThe fetch request options

Promise<SPFetchResponse>

The current status of the fetch operation