I want to insert an event using axios post request. This is the code:
async function inserisciTurni() {
axios.post(`https://www.googleapis.com/calendar/v3/calendars/${calendarioselezionato}/events`, {
calendarId: `${calendarioselezionato}`,
resource: evento,
headers: {
authorization: `Bearer ${accessToken}`,
},
}).then((result) => { console.log(result) })
var evento = {
"summary": "Titolo prova evento",
"description": "prova evento",
"start": {
"dateTime": "2022-08-28T09:00:00-07:00",
},
"end": {
"dateTime": "2022-08-28T17:00:00-07:00",
} };
But I receive this error:

I thought that in your script, your request body is correct. But, I thought that it is required to modify the method for requesting. So, in your script, how about the following modification?
Modified script:
Note:
References: