;(async () => { const rawResponse = await fetch(server + "/api/set_path", { method: "POST", headers: { Accept: "application/json", "Content-Type": "application/json" }, body: strData }) const response = await rawResponse console.log(response) })()
- Parse the response with JSON.parse
- Variable strData
let jsonData = { path: path }
to
let jsonData = { "path": path }
