auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps) => {
}
const fs = require("fs")
this.filename = `/tmp/myfile`
fs.writeFileSync(this.filename, Buffer.from("hello, world"));
auths
objectreturn
or this.key = 'value'
, pass input data to your code viaparams
, and maintain state across executions with$checkpoint.async
(event, steps, params) => {
}
const axios = require("axios")
const fs = require("fs")
const FormData = require("form-data");
const formData = new FormData()
formData.append('file', fs.createReadStream(steps.write_file_to_tmp.filename))
const headers = formData.getHeaders()
const config = {
method: "POST",
url: params.url,
headers,
data: formData,
}
return await axios(config)