Skip to content
This repository was archived by the owner on Sep 22, 2023. It is now read-only.

Commit ff53a50

Browse files
Ben SharafianBen Sharafian
authored andcommitted
feat: update code examples to latest libraries
1 parent fb19942 commit ff53a50

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

index.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,13 @@ <h2 class="simple">Simple Sending</h2>
143143
<div class="tab-content">
144144
<div id="js2" class="tab-pane active">
145145
<pre><code>const plugin = require('ilp-plugin')()
146-
const superagent = require('superagent')
147-
const agent = require('superagent-ilp')(superagent, plugin)
146+
const fetch = require('ilp-fetch')
148147

149-
agent
150-
.get('http://localhost:8080/')
151-
.pay(5000)
148+
fetch('http://localhost:8080/', {
149+
method: 'GET',
150+
maxPrice: 5000,
151+
plugin
152+
})
152153
.then(response => {
153154
console.log('paid!')
154155
console.log('got response:', response.text)
@@ -157,7 +158,8 @@ <h2 class="simple">Simple Sending</h2>
157158

158159
<div id="sh2" class="tab-pane">
159160
<pre><code>$ npm install -g ilp-curl moneyd
160-
$ moneyd start --host ... --secret s...
161+
$ moneyd configure --testnet
162+
$ moneyd start --testnet
161163
$ ilp-curl -X GET localhost:8080/pay
162164
Hello World!</code></pre>
163165
</div>

0 commit comments

Comments
 (0)