OK
const response = await fetch('//api/materials/{id}', { method: 'GET', headers: {}, }); const data = await response.json();
const response = await fetch('//api/materials/{id}', { method: 'DELETE', headers: {}, }); const data = await response.json();
{ "message": "text", "data": false, "success": false }
const response = await fetch('//api/materials', { method: 'POST', headers: { "Content-Type": "application/json" }, body: JSON.stringify({}), }); const data = await response.json();
{ "message": "text", "data": { "id": "text", "filename": "text" }, "success": false }