I'm pulling this file with fetch get request enter image description here
I need to read the file in the incoming file and press the textarea. However, I am not able to convert the returned response (text file) to json and assign it to a variable.
const getMedias = async (id) => {
const response = await fetch(`xxx.com/asset/${id}/`);
await checkError(response);
const responseBody = await response.json();
return responseBody.result;
};
This is how my get request is and this is the response that returns When the response from the request is printed to the console, it looks like this