nodeSolidServer / nodeSolidServer/node-solid-server

PUT Requests storing empty JSON object

Đang mở
#1,165 12 bình luận 0 reaction 1 người được giao Xem trên GitHub

@jaxoncreed đang làm issue này rồi.

Từ ngày 24/4/2019.

test-case
Ngôn ngữ chính
JavaScript
Star
1.8k
Fork
308
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

{}

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.