Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update mutable tests with new spec #6

Merged
merged 15 commits into from
Jun 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 18 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,25 @@ Progress: https://github.com/ipfs/community/discussions/573
- [x] Render empty directories
- [x] Resolve `index.html` in a path
- `mutable.html` Tests (experimental, some things subject to change)
- [x] JS `fetch('ipfs://CID/example.txt', {method: 'POST'})`
- [x] JS `fetch('ipns://CID/', {method: 'POST'})`
- [x] JS `fetch('ipns://CID/example.txt', {method: 'POST'})`
- [x] JS `fetch('ipfs://CID/', {method: 'POST', body: new FormData})`
- [x] JS `fetch('ipfs://CID/example.txt', {method: 'DELETE'})`
- [x] JS `fetch('ipns://CID/example.txt', {method: 'DELETE'})`
- [x] JS `fetch('ipfs://<CID>/example.txt', {method: 'PUT'})`
- [x] JS `fetch('ipfs://<CID>/', {method: 'PUT', body: new FormData})`
- [x] JS `fetch('ipfs://<CID>/example.txt', {method: 'DELETE'})`
- [x] JS `fetch('ipns://<key>', {method: 'POST', body: <CID>})`
- [x] JS `fetch('ipns://<key>/example.txt', {method: 'POST', body: <CID>})`
Comment on lines +37 to +38
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 sending CID in the body feels weird, but I can't put my finger on why 😅

I was thinking that maybe it is squatting too much, what if one wants to do IPNS in userland, maintain keys on their own, create, sign record in JS, and then send it to ipns:// only for publishing? I believe we should make sure a primitive for doing it exists.

I guess that could be represented as POST with Content-Type: application/vnd.ipfs.ipns.record ?

- [x] JS `fetch('ipns://<key>', {method: 'PUT', body: file})`
- [x] JS `fetch('ipns://<key>/example', {method: 'PUT', body: file})`
- [x] JS `fetch('ipns://<key>', {method: 'PUT', body: formdata})`
- [x] JS `fetch('ipns://<key>/example', {method: 'PUT', body: formdata})`
- [x] JS `fetch('ipns://<key>/example.txt', {method: 'DELETE'})`
- [x] JS `fetch('ipns://localhost?key=<name>', {method: 'GET})`
- [x] JS `fetch('ipns://localhost?key=<name>', {method: 'DELETE})`
- `dag.html` Tests (experimental, some things subject to change)
- [x] GET `ipfs://CID/?format=CAR`
- [x] GET `ipfs://CID/?format=block`
- [x] GET `ipfs://CID/?format=dag-json`
- [x] GET `ipfs://CID/?format=dag-cbor`
- [x] POST `Content-Type: application/json` `?format=dag-cbor` & GET `?format=dag-cbor`
- [x] POST over existing CID to add to graph
- [x] GET `ipfs://<CID>/?format=car`
- [x] GET `ipfs://<CID>/?format=raw`
- [x] GET `ipfs://<CID>/?format=dag-json`
- [x] GET `ipfs://<CID>/?format=dag-cbor`
Comment on lines +47 to +50
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 we should add tests with Accept header at some point – filled #7 so we dont forget

- [x] POST `Content-Type: application/json` `?format=dag-cbor` & GET `?format=dag-cbor`
- [x] POST over existing CID to add to graph

## Screenshots:

Expand Down
Loading