Update mutable tests with new spec#6
Conversation
t get redirect url
Update mutability tests to match spec
lidel
left a comment
There was a problem hiding this comment.
lgtm, but we should update format= to align with specs and go-ipfs 0.13 (details below)
Co-authored-by: Marcin Rataj <[email protected]>
lidel
left a comment
There was a problem hiding this comment.
lgtm, some thoughts around ipns:// in comments inline, but we can improve these areas in follow-up PRs, this is already good step forward, thank you @RangerMauve!
|
|
||
| console.log('Uploading to IPFS') | ||
| const { stdout: output } = await exec('ipfs add ./files/ --cid-version=1 --raw-leaves=false -r') | ||
| const { stdout: output } = await exec('ipfs add ./files/ --cid-version=1 --raw-leaves=false -r --api /ip4/127.0.0.1/tcp/5001') |
| - [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` |
There was a problem hiding this comment.
💭 we should add tests with Accept header at some point – filled #7 so we dont forget
| - [x] JS `fetch('ipns://<key>', {method: 'POST', body: <CID>})` | ||
| - [x] JS `fetch('ipns://<key>/example.txt', {method: 'POST', body: <CID>})` |
There was a problem hiding this comment.
💭 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 ?
Talking to Lidel about IPNS protocols in particular, we decided to take a new approach to generating and managing keys for IPNS.
It'd be good to get this merged in in case other browser vendors would be looking at adding mutability to their IPFS support.