ucanto
ucanto copied to clipboard
prototype ucanto sending requests over http using content-type: multipart
Motivation:
- make it easier to debug ucanto via web browser dev tools. right now we send CAR file format which is the only multi-block ipld format that made sense at the time. but maybe multipart messages could encode multiple dag-json blocks. Since web browsers already send multipart requests for html forms with file inputs, maybe this would be better in liu of explicit CAR devtooling in the browser
Why it's worth exploring:
- console.web3.storage uses ucanto for its connection to up.web3.storage, but it uses ucanto in a way where the bytes over the wire aren't parsed by most browsers devtools. If we prototype other ways of encoding the ucanto messages that do look good in browser devtools, console can use that and be more debuggable/demoable
this is a prototype of many dag-json CIDs in a multipart message. https://github.com/web3-storage/migrate-to-w3up/pull/1 (using content-id header...)