Вы можете попробовать это:
const getData = async () => {
try {
const response = await axios.get(`https://jsonplaceholder.typicode.com/posts`, {
method: 'GET',
body: JSON.stringify({
id: id,
title: 'title is here',
body: 'body is here',
userId: 1
}),
headers: {
"Content-type": "application/json; charset=UTF-8"
}
})
.then(response => response.json())
.then(json => console.log(json));
console.warn(response.data);
} catch (error) {
console.warn(error);
}
}