auths objectreturn or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.async (event, steps, auths) => {}const axios = require("axios")
const resp = await axios({
url: "https://api.short.io/api/domains",
headers: {
"Accept": `application/json`,
"Authorization": `${auths.short.secret_key}`,
},
validateStatus: () => true, // will not throw error when axios gets a 400+ status code (the default behavior)
})
if (resp.status >= 400) {
this.debug = resp
throw new Error(JSON.stringify(resp.data, null, 2)) // This can be modified to throw any error you'd like
}
return respauths objectreturn or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.async (event, steps) => {}const axios = require("axios")
const resp = await axios({
url: "https://httpstat.us/200",
validateStatus: () => true, // will not throw error when axios gets a 400+ status code (the default behavior)
})
if (resp.status >= 400) {
this.debug = resp
throw new Error(JSON.stringify(resp.data, null, 2)) // This can be modified to throw any error you'd like
}
return respauths objectreturn or this.key = 'value', pass input data to your code viaparams, and maintain state across executions with$checkpoint.async (event, steps) => {}const axios = require("axios")
const resp = await axios({
url: "https://httpstat.us/400",
validateStatus: () => true, // will not throw error when axios gets a 400+ status code (the default behavior)
})
if (resp.status >= 400) {
this.debug = resp
throw new Error(JSON.stringify(resp.data, null, 2)) // This can be modified to throw any error you'd like
}
return resp