Feature #74532

Support PUT, PATCH and DELETE requests in PSR-7 API

Added by Andreas Wolf almost 5 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2016-03-09
Due date:
% Done:

100%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The PSR-7 compliant API (ServerRequestFactory and friends) currently relies on GeneralUtility for decoding a request, which in turn uses PHP’s internal support for decoding a request body. This, however, only works for POST requests, which is also why the methods are named GeneralUtility::_POST etc.

To support more modern server APIs, we should at least include support for PUT, PATCH and friends in the new API, which will eventually replace the static methods in GeneralUtility one day.


Files

put_test.zip (1.86 KB) put_test.zip Andreas Wolf, 2016-03-09 10:20
#1

Updated by Gerrit Code Review almost 5 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47161

#2

Updated by Andreas Wolf almost 5 years ago

How to test:

  1. extract and install the attached test extension
  2. create a new site in your installation with a TypoScript root template that includes the static template from the extension
  3. fire requests to the page:
    • curl -X POST "http://my.dev.machine/index.php?id=123" --data-urlencode "foo=bar"
    • curl -X PUT "http://my.dev.machine/index.php?id=123" --data-urlencode "foo=bar"
    • curl -X DELETE "http://my.dev.machine/index.php?id=123" --data-urlencode "foo=bar"
#3

Updated by Gerrit Code Review over 4 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47161

#4

Updated by Gerrit Code Review about 4 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/47161

#5

Updated by Andreas Wolf about 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#6

Updated by Benni Mack over 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF