[TYPO3-core] RFC #16011: Feature: getUrl function needs support for sending POST data

Marcus Krause marcus#exp2010 at t3sec.info
Mon Oct 25 13:41:03 CEST 2010


Jigal van Hemert schrieb am 10/25/2010 12:23 PM Uhr:
> Hi,
> 
> On 25-10-2010 11:28, Marcus Krause wrote:
>> The committed and incomplete implementation of POST allows to send POST
>> arguments as array(key-value-pairs) or string with joined arguments
>> ("foo=bar").
> 
> True, simply because cUrl supports this (plus file upload if the file
> path/name starts with '@').
> 
>> There's a hidden logic that sets the content-type to
>> "multipart/form-data" when arguments are supplied as array.
>> IMHO, this contradicts the "Principle of Least Surprise" as arguments to
>> provide as array or string seem to be equal options.
> 
> HTTP header 'logic' dictates this. If the arguments are sent like a GET
> query string a different kind of content-type header is required.

No, this is done because cURL supports this kind of magic (see your
statement on top). But it doesn't mean we (TYPO3) need to support this
"magic".


The getUrl method (with the follow-up) would be about 300 lines long.
This is no longer maintainable.


After all, because of the various reasons I've outlined in my postings,

-1 from myself

(means revert of already submitted incomplete patch) to this complete
feature (POST for getUrl()).

I prefer a HTTP request implementation in a separate class.


Marcus.


More information about the TYPO3-team-core mailing list