Skip to content

Add onBlock processor to all requests #139

@edeckers

Description

@edeckers

Originally suggested by @pke in #136

The library is missing the support for processing data that is being transferred.

Proposed solution

  • Add .onBlock(fn: (block) => void, settings?: { blockSize: number }), similar to onProgress
  • Add .onFinishStream(fn: (block) => void) which will be called instead of .onBlock when the last block of the stream arrives

Progress

  • Add .onBlock method to TypeScript code base
  • Add .onFinishStream method to TypeScript code base
  • Intercept data and send it in chunks to .onBlock and .onFinishStream over the bridge on Android
  • Intercept data and send it in chunks to .onBlock and .onFinishStream over the bridge on iOS
  • Allow transformation of intercepted data in .onBlock and .onFinishStream-callbacks
  • Write transformed data to the target
  • Add TypeScript tests
  • Add Android tests
  • Add iOS tests

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions