Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Drupal 8's REST supports POST instead of PUT, however the docs still mention PUT.
Proposed resolution
Change the docs to state that the rest module supports POST, and that it doesn't explicitly support PUT.
Remaining tasks
None
User interface changes
None
API changes
None
Data model changes
None
Beta phase evaluation
Issue category | Bug because the documentation of the rest module is inaccurate, specifying only PUT requests are supported where that should be POST requests are supported, and PUT requests have implicit support. |
---|---|
Issue priority | Normal because it has an isolated impact. |
Unfrozen changes | Unfrozen because it only changes documentation of the rest module to be more precise. |
Prioritized changes | None |
Disruption | None |
Comment | File | Size | Author |
---|---|---|---|
#14 | docs_mention_support-2349431-14.patch | 967 bytes | talhaparacha |
#12 | docs_mention_support-2349431-12.patch | 972 bytes | talhaparacha |
#8 | drupal-put-post-2349431-2.patch | 5.81 KB | bhavinvora |
#1 | drupal-put-post-2349431-1.patch | 919 bytes | Cyberwolf |
Comments
Comment #1
Cyberwolf CreditAttribution: Cyberwolf commentedComment #2
Cyberwolf CreditAttribution: Cyberwolf commentedComment #3
R.Muilwijk CreditAttribution: R.Muilwijk commentedComment #4
alexpottBut there is plenty of occurrences of PUT still in the rest module? Is this really correct?
Comment #5
dawehnerAs far as I understand it is that rest module itself is generic enough to be able to also support PUT, but at least the entity specific plugin,
does not support it at the moment.
Comment #6
jhedstromPerhaps the docs should mention that PUT support is limited rather than remove entirely?
Comment #7
klausiYeah, let's still mention PUT but also add something like "(currently unused by generic entity resources)".
Comment #8
bhavinvora CreditAttribution: bhavinvora as a volunteer commentedComment added as required in core file.
added a PUT with required comment.
Comment #9
bhavinvora CreditAttribution: bhavinvora as a volunteer commentedComment #11
Anonymous (not verified) CreditAttribution: Anonymous at XIO commentedThe patch in #8 removes two files. That is probably unintended.
Furthermore, we do want to document the POST method, so that should be added again.
This line is too long (80 chars max) and also has a trailing space which should be removed.
Comment #12
talhaparacha CreditAttribution: talhaparacha as a volunteer commentedThis patch might resolve the issue as per the discussion above.
Comment #13
Anonymous (not verified) CreditAttribution: Anonymous at XIO commentedAlmost there!
This indentation is not correct. See here for more information.
So as I understand it, there actually is support for PUT so we could add it here as well?
Furthermore, the issue summary is no longer is accurate. So we should update that as well.
Added a beta evaluation.
Comment #14
talhaparacha CreditAttribution: talhaparacha as a volunteer commented@pjonckiere Fixed the indentation. About the other issue, I'm not sure. But considering this line "...support for GET, POST, PATCH, and DELETE quests on entities... " and comment # 5, I think we should not mention "PUT" there.
Comment #15
Anonymous (not verified) CreditAttribution: Anonymous at XIO commentedOk, that makes sense. I updated the IS to explain the change we are making.
I think this is ready to go in.
Comment #16
alexpottCommitted db44068 and pushed to 8.0.x. Thanks!