Superagent-ILP
Extension of Superagent to pay for HTTP-ILP
To use Superagent ILP, combine the superagent module with an plugin (as
returned from ilp-plugin
in
this example).
const superagent = const plugin = const superagentIlp = superagent plugin { await plugin const res = await superagentIlp // pays _up to_ 2000 base units of your ledger, as configured for ilp-plugin console // -> { message: 'Hello World!' }}
Below is an example of an application that can be paid for with superagent-ilp
.
It's written using koa-ilp
.
const Koa = const router = const parser = const app = const Ilp = const plugin = const ilp = plugin router app