Open1
JavaScript/TypeScript の axios について

axios Post通信
JSON データの Post Ver. Authorization Bearer Token
try {
const response = await axios.post(
lineBotMessageApiPostUrl,
json,
{
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${env.CHANNEL_ACCESS_TOKEN}`,
}
});
return res.json(response.data);
} catch (error) {
console.error(error);
return res.status(500).json({ error: 'Get API Error' });
}