nodeSolidServer / nodeSolidServer/node-solid-server
PUT Requests storing empty JSON object
Open
@jaxoncreed is already working on this.
Since Apr 24, 2019.
test-case
- Dominant language
- JavaScript
- Stars
- 1.8k
- Forks
- 308
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to update text files on my pod using a PUT request. If I have a text file, e.g. /public/hello.txt and make a PUT request to override its value, the file is replaced by a text file with an empty JSON object.
Here's a snipped of the code I used to perform the PUT request. Here we are assuming /public/hello.txt exists already.
url = "https://boulderwebdev.solid.community/public/hello.txt"
solid.fetch(url, {
method: "PUT",
headers: {
"Content-Type": "text/plain"
},
body: JSON.stringify({"hello": "world"})
}).then(resp => {...})
If you go to https://boulderwebdev.solid.community/public/hello.txt now you will see a page with the text
{}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.