🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@alexandre-daubois
Copy link
Member

@alexandre-daubois alexandre-daubois commented Jul 21, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? yes
Deprecations? no
Issues Fix #60521
License MIT

Not much difference from GET, appart that the request body is used to generate the cache key in HttpCache.

Webprofiler integration:

image

@MatTheCat
Copy link
Contributor

Should

&& \in_array(strtoupper($request->server->get('REQUEST_METHOD', 'GET')), ['PUT', 'DELETE', 'PATCH'], true)
be updated to add QUERY to the list?

@alexandre-daubois
Copy link
Member Author

The same question applies to create(). I'm not sure. The RFC says:

Implementations MAY use a request body of any content type with the QUERY method

I guess that if we may, we can fallback on application/x-www-form-urlencoded like other methods

@stof
Copy link
Member

stof commented Jul 21, 2025

We should indeed parse a application/x-www-form-urlencoded body like for other methods.

@alexandre-daubois alexandre-daubois force-pushed the query-method branch 4 times, most recently from 0201731 to f9d9416 Compare July 21, 2025 12:03
@carsonbot carsonbot changed the title [HttpFoundation][HttpKernel] Add support for the QUERY HTTP method [HttpFoundation][HttpKernel][WebProfilerBundle] Add support for the QUERY HTTP method Jul 21, 2025
@alexandre-daubois
Copy link
Member Author

PR updated. A follow-up PR would be to also support the method in HttpClient. I added support for the method also in WebProfilerBundle

@alexandre-daubois alexandre-daubois force-pushed the query-method branch 5 times, most recently from 759bdfd to c6c62e4 Compare July 21, 2025 13:17
@alexandre-daubois
Copy link
Member Author

alexandre-daubois commented Jul 21, 2025

The tests are passing, but failing when reruned here. Not sure why though. Should we remove http-kernel@^6.4 from WebProfilerBundle's composer.json?

Status: Needs Review

@fabpot
Copy link
Member

fabpot commented Aug 16, 2025

Thank you @alexandre-daubois.

@fabpot fabpot merged commit 73ce8e5 into symfony:7.4 Aug 16, 2025
10 of 12 checks passed
nicolas-grekas added a commit that referenced this pull request Oct 15, 2025
…ethods (nicolas-grekas)

This PR was merged into the 7.4 branch.

Discussion
----------

[HttpClient] Add QUERY to the list of retriable HTTP methods

| Q             | A
| ------------- | ---
| Branch?       | 7.4
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Issues        | #60521
| License       | MIT

Similar to #61173

Commits
-------

da60084 [HttpClient] Add QUERY to the list of retriable HTTP methods
This was referenced Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for QUERY method

7 participants