Hello, i tried the resp.json, resp, resp.text but the result of my api request hasn’t shown, sometimes it show the redirection:false when i use the resp.json and resp.text it show only “function”
const ws = "https://api.writesonic.com/v1/business/content/ai-article-writer-v2?&end_user_id=test1&engine=economy&language=en";
let config = {
method: 'post',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-API-KEY': 'apikey'
},
body : JSON.stringify({
"article_title": atitle,
"article_intro": asection,
"article_sections": o
'Tourist information about the city of Vitrolles in the department of Bouches-du-Rhone 13',
'Tourist information about the city of Abbeville in the department of Somme 80',
'Tourist information about the city of Ablon-sur-Seine in the department of Val-de-Marne 94'
]
}),
data : data
};
try {
const resp = await remoteFetchAsync(ws, config);
console.log(resp.json);
}
catch(error) {
console.log('Error happened here!')
console.error(error)
}