When you await on an Axios request, you get back an Axios response. An Axios response is a POJO with severalproperties, including data, which contains the parsed response body.
An Axios response contains several other properties, like status, which contains the HTTP response statuscode (like 200 or 404). But most of the time you don't care about the response code if the requestsucceeded, so you will often see code that gets the response body directly using promise chaining. You can also get the response body using destructuring assignments.
Simple POST request with a JSON body using axios
So if the server sends back a different contenttype, you may need to handle it the response yourself. For other content types, like text/html, the res.data property will be a string. You can configure the type of the data property using Axios' responseType object. By default,responseType is set to 'json', which means Axios will try to parse the response as JSON.
However, that isn't correct if you're looking to, say, download an image using Axios. You can set responseType to 'arraybuffer' to get the response as an ArrayBuffer:.