import axios from "axios"
export default defineComponent({
props: {
myDataStore: {
type: "data_store",
},
},
async run({ steps, $ }) {
const variable = JSON.stringify({
'grant_type': '',
'client_id': '',
'client_secret': '',
'username': '',
'password': '',
});
const headers= {
'Content-Type': 'application/vnd.api+json',
'Accept': 'application/vnd.api+json',
"Accept-Encoding": `gzip, deflate`,
};
const {data} = await axios({
method: "POST",
url: "https://legacy/Api/access_token",
data: variable,
headers: headers
})
return 1;
},
})
I’m using this code in pipedream.
At the first time, it works well. but second time, it doesn’t work.
I’m getting timeout error.