json stringify issue

Created
Created
2020 Jan 9 6:2
Tags
Tags
;(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) })()
  1. Parse the response with JSON.parse
  1. Variable strData
let jsonData = { path: path }
to
let jsonData = { "path": path }
 
 
 
 
 
 

Recommendations