If I try to POST or PUT a JSON file using solid.auth.fetch then an empty file is stored on the server. For example, I could call
const data = JSON.stringify({
"hello": "world"
})
const url = 'https://boulderwebdev.solid.community/public/'
solid.auth.fetch(url, {
method: "POST",
headers: {
"Content-Type": "application/json",
"Slug": "data",
"Content-Length": data.length
},
body: data
}).then((resp) => { ... })
and the server will create a file and respond with
201
allow OPTIONS, HEAD, GET, PATCH, POST, PUT, DELETE
content-length 7
content-type text/plain; charset=utf-8
etag W/"7-rM9AyJuqT6iOan/xHh+AW+7K/T8"
link <.acl>; rel="acl", <.meta>; rel="describedBy", <http://www.w3.org/ns/ldp#Container>; rel="type", <http://www.w3.org/ns/ldp#BasicContainer>; rel="type"
location /public/data.json
vary Accept, Authorization, Origin
If I try to
POSTorPUTa JSON file usingsolid.auth.fetchthen an empty file is stored on the server. For example, I could calland the server will create a file and respond with