lotion
lotion copied to clipboard
Can there be an better explanation with the new way of doing things with axios?
I understand that there is an thread speaking about
async function main(){
await app.use(handler);
let appInit = await app.start();
let { state, send } = await connect(appInit.GCI)
// query state, this is what would have been at http://localhost:3000/state before
console.log(await state)
// create tx (previously POST http://localhost:3000/txs)
// console.log(await send({ foo: 'bar' }))
}
solution to replace http://localhost:3000/state before and POST http://localhost:3000/txs)
however I will like to request how can we still expose the endpoint via using axios with an endpoint with newer versions especially on POST http://localhost:3000/txs. In short possible to provide code snippets example of how can we implement POST http://localhost:3000/txs with leaving an external endpoint with axios?
Please assist.