Missing HTTP verb: QUERY #60564
Replies: 8 comments
-
|
That link is a proposal, right? Are there any frameworks, in any programming language, implementing it already? Also, are there any server runtimes (Node.js, Python, etc.) that support it already? |
Beta Was this translation helpful? Give feedback.
-
You can: public function get($uri, $action = null)
{
return $this->addRoute(['GET', 'HEAD'], $uri, $action);
}framework/src/Illuminate/Routing/Router.php Line 158 in 4f65316 You can Write Route::addRoute(['QUERY', 'HEAD'], '/example', .... |
Beta Was this translation helpful? Give feedback.
-
|
@rodrigopedra |
Beta Was this translation helpful? Give feedback.
-
|
Symfony added support to it just to its HTTP Client component, the one that wraps curl. On their Http Foundation they added a constant to a class, but nothing more, no routing support, no body parsing, no checks for idempontency, at least not yet as of today. If I understand well, Maravel is your fork from Laravel with patches that didn't make the cut on PRs here and other changes you deemed important, right? It is great that you add experimental features to your fork, but adding a feature is a kind of maintenance compromise on the long run, adding support to proposals not yet made official is a tricky decision on this regard. Out of curiosity, isn't your fork's name ("Maravel") close enough to Laravel to infringe its trademark? I am not a lawyer, and I believe as long it is a personal fork there souldn't be a problem. But when you start promoting it as an alternative framework, as you do here listing it as an example of this feature being adopted, I guess it could be a trademark infringement. |
Beta Was this translation helpful? Give feedback.
-
|
There are different HTTP verbs, depending on what you are doing (e.g. WebDAV has Since
|
Beta Was this translation helpful? Give feedback.
-
|
@marius-ciclistu no worries, I thought on bringing this matter to attention not to push you back from working on Maravel, but to maybe considering any risks on your continued effort. I am neither a maintainer nor a trademark expert or attorney. So please take my words lightly and not as a criticism. |
Beta Was this translation helpful? Give feedback.
-
|
It's disappointing that this got moved to the discussion channel while I was unavailable, but given that indeed Laravel has e.g. Given the vast volume of discussion topics being created and commented on, I can imagine this topic is gonna be forgotten and no support for the QUERY verb will be added. Would be lucky if we can use I consider the proposed |
Beta Was this translation helpful? Give feedback.
-
|
For anyone following this: QUERY support is now actively moving in PRs.
Worth noting since it came up above: as of Symfony 7.4 (Laravel 13's minimum), HttpFoundation supports QUERY beyond just a constant, Request::create() places parameters in the request body like POST/PUT/DELETE, and Request::createFromGlobals() parses QUERY request bodies. And QUERY is no longer a draft, it was published as RFC 10008 on the Standards Track. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Laravel Version
13.8.0
PHP Version
8.5.7
Database Driver & Version
N/A
Description
The HTTP
QUERYverb RFC is now in the Standards Track:https://www.rfc-editor.org/info/rfc10008/
To summarize the RFC, the
QUERYverb behaves like aGETverb that has a valid and meaningful body just like thePOSTverb, andQUERYresponses are cacheable which is different from thePOSTverb. It allows for APIs that query resources in highly expressive and intricate ways without sacrificing cacheability.Currently, Laravel does not have any way to make use of this HTTP verb. This is a problem.
Given that this RFC is new, it may be desirable to add support to the
QUERYverb as soon as possible to indicate that Laravel is aware of new developments in the general internet world and is following latest trends.Steps To Reproduce
N/A
Beta Was this translation helpful? Give feedback.
All reactions