-
Notifications
You must be signed in to change notification settings - Fork 373
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
Feature request: allow customizing Server Function HTTP method #902
Comments
We've implemented this in Bling. It will make it's way to SolidStart. |
Awesome – can't wait! |
server$
HTTP method
Not sure why POST would even make sense as the default, actually... What is the default of HTML ( IMHO there is only one sane default for requests and that is GET... Oh and it is not just Vercel's Edge Network. The same is true for .e.g. CloudFlare. For the same reason you should avoid adding |
@Download The only reason POST makes sense is because the server functions utilizes the request body, something that GET cannot offer. However, GET can be potentially supported, ideally if the function has no arguments or if the arguments can be safely encoded in the url. Other methods should work just fine |
This has been implemented in SolidStart in 0.5.x via the GET method. |
Currently, all requests done on the client-side for a
server$
function are POST requests. This makes sense as a default, but there are many possible use-cases forserver$
for simply querying data, where a GET request would be more appropriate. This is not just semantics, with the problem I run into the impossibility of cachingserver$
requests on Vercel's Edge Network. Therefore, I would appreciate the option to select a different HTTP method. For context, I raised this issue for pRPC (OrJDev/prpc#73), which usesserver$
for aquery$
function under the hood, which therefore is limited by Solid Start.The text was updated successfully, but these errors were encountered: