Meexa
Meexa
Explore posts from servers
HHono
Created by Meexa on 6/20/2024 in #help
How to do filepath as a param in an RPC route?
Hey, I'm trying to fetch a file/folder with an RPC route and want to add the filepath to the URL as a param, but this doesn't work because then I get a 404. Example: /api/folders/:filepath -> /api/folders/foo/bar/baz This results in a 404 because of the extra slashes is my guess. I tried with a wildcard and that works when I use curl/fetch, but I don't know how to add the filepath to the url using RPC /api/folders/folder/* -> api.folders.folder['*'].$get() <- how to add /foo/bar/baz to this? So I don't think wildcard is the way to go here, but I can't find anything about catch-all params or anything in the docs.
7 replies