Closed RangerMauve closed 2 years ago
Some options for special path formats:
hyper://example/$/tags/
hyper://example/$tags/
hyper://example/@/tags/
hyper://example/@tags/
Note, we need characters that might not be valid FS paths, but won't conflict with URL things like ?
and #
Gonna go with /$/
for now.
This is out in 8.0.0-0. Going to test it a bit before doing a full release, but that's likely what it's going to end up looking like.
This has been released for a while actually. 😅
After playing with this for a while, it seems that using non-standard method names is a huge issue with clients.
For example, Godot only supports
GET
,HEAD
,POST
,PUT
,DELETE
,OPTIONS
,TRACE
,CONNECT
, andPATCH
Node has a bunch more methods, but we're using a bunch that aren't supported there either.
I propose instead using a special path for things that aren't just Hyperdrive data. Maybe under the prefix like
hyper://example/$/
orhyper://example/@
Here's the weird method names we'll need to fill and some proposals:
DOWNLOAD hyper://example/path/to/thing
=>GET hyper://example/path/to/thing?seed
CLEAR hyper://example/path/to/thing
=>DELETE hyper://example/path/to/thing?clear
TAG hyper://example/ TAG_NAME
=>PUT hyper://example/$/tags/TAG_NAME
TAGS hyper://example/
=>GET hyper://example/$/tags/
TAG-DELETE hyper://example/
=>DELETE hyper://examples/$tags/TAG_NAME
This could also play well with the need to expose additional data like
peers
andextensions
. e.gGET hyper://example/$/peers/
Does this seem like a good idea? Any suggestions for the path names?