mirror of
https://github.com/Permissionless-Software-Foundation/bch-dex.git
synced 2026-09-21 16:52:00 -07:00
26 lines
495 B
JavaScript
26 lines
495 B
JavaScript
/*
|
|
Part 2 of 3: Take an offer by submiting a counter-offer.
|
|
*/
|
|
|
|
const axios = require('axios')
|
|
|
|
const LOCALHOST = 'http://localhost:5700'
|
|
|
|
async function start () {
|
|
try {
|
|
const options = {
|
|
method: 'post',
|
|
url: `${LOCALHOST}/offer/take`,
|
|
data: {
|
|
offerCid: 'zdpuAppDJR57Hrn1mAhsFRssSBp5qNrDT6PcSeHL5ndQqiqJc'
|
|
}
|
|
}
|
|
|
|
const result = await axios(options)
|
|
console.log('result.data: ', result.data)
|
|
} catch (err) {
|
|
console.log(err)
|
|
}
|
|
}
|
|
start()
|