Feature #45293

Base Distribution - Work Package #45088: Improved REST support

More flexible parsing of body arguments

Added by Bastian Waidelich over 8 years ago. Updated about 7 years ago.

Status:
Resolved
Priority:
Should have
Category:
Http
Target version:
-
Start date:
2013-02-08
Due date:
2013-04-13
% Done:

100%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

Description

Parsing of body arguments (e.g. xml, json) currently takes place in Http\Request and is hard-coded there.
Besides from being a bit buggy (e.g. you currently have to specify two root nodes like <root><product><title>changed title</title></product></root> where a common REST request would expected to be just <title>changed title</title>) the behavior can't be influenced easily because it happens so early in the request handling.


Related issues

Related to TYPO3.Flow - Feature #37604: Make Flow RestController useless by improving MVC stackResolvedBastian Waidelich2012-05-30

Actions
Related to TYPO3.Flow - Task #48615: Extract MediaType handling from HTTP requestResolvedBastian Waidelich2013-05-28

Actions
Related to TYPO3.Flow - Feature #54600: Request arguments not available in all HTTP methodsResolvedBastian Waidelich2013-12-26

Actions
#1

Updated by Bastian Waidelich over 8 years ago

Also see Marco Falkenbergs comment on #37604:

Some additional thoughts...

Processing of request content

In case of RESTful webservices the processing of the request's content should be more advanced and extensible. For now i.e. XML data is poorly treated by just converting over a SimpleXMLElement to an array. I know that this lack is mentioned by Robert in the comment, but there is no according issue tracker.

The funny thing is we have everything to make this work, because we have the property mapper with its type converters and their customizable configurations. Why don't allow IANA types AND class types as source types for a type converter? It's just pulling the responsibility for the property mapper one level up. Then you can implement the handling of XML data with your own XML type converter that i.e. accepts the source types 'application/xml', 'DOMNode', 'DOMElement', 'DOMDocument', 'DOMText'.

I tried it out and it works!

#2

Updated by Bastian Waidelich over 8 years ago

In addition: Currently only a fixed set of mediaTypes are supported, when specifying a Content-Type header like application/hal+json the body arguments are ignored!

#3

Updated by Bastian Waidelich over 8 years ago

  • Parent task set to #45088
#4

Updated by Aske Ertmann over 8 years ago

  • Parent task deleted (#45088)
#5

Updated by Aske Ertmann over 8 years ago

  • Parent task set to #45088
#6

Updated by Bastian Waidelich over 8 years ago

  • Due date set to 2013-04-06
#7

Updated by Bastian Waidelich over 8 years ago

  • Due date changed from 2013-04-06 to 2013-04-13
#8

Updated by Robert Lemke over 8 years ago

  • Target version deleted (2.1)
#9

Updated by Gerrit Code Review over 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21134

#10

Updated by Bastian Waidelich over 8 years ago

  • % Done changed from 0 to 80
#11

Updated by Gerrit Code Review about 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21134

#12

Updated by Gerrit Code Review about 8 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21134

#13

Updated by Gerrit Code Review about 8 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21134

#14

Updated by Gerrit Code Review about 8 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21134

#15

Updated by Bastian Waidelich about 8 years ago

  • % Done changed from 80 to 100
#16

Updated by Gerrit Code Review about 8 years ago

Patch set 6 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21134

#17

Updated by Gerrit Code Review about 8 years ago

Patch set 7 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21134

#18

Updated by Gerrit Code Review almost 8 years ago

Patch set 8 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/21134

#19

Updated by Gerrit Code Review almost 8 years ago

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

#20

Updated by Gerrit Code Review almost 8 years ago

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

#21

Updated by Gerrit Code Review over 7 years ago

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

#22

Updated by Gerrit Code Review over 7 years ago

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

#23

Updated by Gerrit Code Review over 7 years ago

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

#24

Updated by Gerrit Code Review over 7 years ago

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

#25

Updated by Gerrit Code Review over 7 years ago

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

#26

Updated by Gerrit Code Review over 7 years ago

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

#27

Updated by Gerrit Code Review over 7 years ago

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

#28

Updated by Gerrit Code Review over 7 years ago

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

#29

Updated by Gerrit Code Review over 7 years ago

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

#30

Updated by Gerrit Code Review over 7 years ago

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

#31

Updated by Gerrit Code Review over 7 years ago

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

#32

Updated by Rens Admiraal about 7 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF