[TYPO3-core] RFC #16011: Feature: getUrl function needs support for sending POST data
Jigal van Hemert
jigal at xs4all.nl
Mon Oct 25 12:23:19 CEST 2010
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.
The follow up with POST support for fsockopen and separate support for
file_get_contents also uses different kinds of content-type headers for
different cases. That's the way HTTP headers work.
--
Kind regards / met vriendelijke groet,
Jigal van Hemert
skype:jigal.van.hemert
msn: jigal at xs4all.nl
http://twitter.com/jigalvh
More information about the TYPO3-team-core
mailing list