How to use the @cycle/http/lib/cjs/http-driver.optionsToSuperagent function in @cycle/http

To help you get started, we’ve selected a few @cycle/http examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cyclejs-community / cycle-remote-data / src / index.ts View on Github external
start(listener) {
      request = optionsToSuperagent(requestOptions);

      listener.next(Loading(0));

      if (requestOptions.progress) {
        request = request.on('progress', ev =>
          listener.next(Loading(ev.percent || 0))
        );
      }

      request.end(processResponse(requestOptions, listener));
    },

@cycle/http

A Cycle.js Driver for making HTTP requests

MIT
Latest version published 5 years ago

Package Health Score

65 / 100
Full package analysis

Similar packages