Skip to main content

execute_paginated

Function execute_paginated 

Source
pub async fn execute_paginated(
    spec: &CachedSpec,
    call: OperationCall,
    ctx: ExecutionContext,
    writer: &mut impl Write,
) -> Result<u64, Error>
Expand description

Runs the pagination loop, writing each result item as a NDJSON line to writer.

Returns the total number of items emitted across all pages.

ยงErrors

Returns an error on HTTP failure or malformed JSON. A partial result may already have been written to writer before the error occurs.