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

Marcus Krause marcus#exp2010 at t3sec.info
Mon Oct 25 11:09:27 CEST 2010


Hi!

Susanne Moog schrieb am 10/23/2010 09:45 PM Uhr:
> you are right, I did not pay enough attention (sorry!), because I always
> use cURL and therefore did not think about "other" ways.

Don't worry!


> I see multiple possibilities here:
> a) adjust the comment to make it clear that it's only possible to
> attache postVars to cURL requests
> b) revert the patch and drop it
> c) add the missing functionality for "normal" requests (I already tried
> that the last half hour but without success, I remember now why we are
> always using cURL ;))
> 
> I'd like to see (c) but I am not sure if I can get that to work, anybody
> knows more about this stuff?

b) A revert is the best solution. There's no need to "drop" this RFC.
We just have to wait for a complete solution.


It's a bit late but I don't like the API of getUrl(). POST and GET just
differ from each other by sending parameters to the URL with a different
HTTP method.
Keeping that in mind an ideal solution would be

getUrl (string $url, string $httpMethod = 'GET', mixed $arguments =
NULL, ...)

with $url being host and path AND
$argument being query argument as key-value array or arguments as string
 (foo=bar&argument=value)


Finally, this method is a monster and it should be considered to extract
it and move it to a separate class ("t3lib_httpRequest" or similiar).


Marcus.


More information about the TYPO3-team-core mailing list