[fpc-pascal] fpweb and reading the contents of a request

Michael Van Canneyt michael at freepascal.org
Mon Oct 17 17:24:41 CEST 2011



On Mon, 17 Oct 2011, Felipe Monteiro de Carvalho wrote:

> On Mon, Oct 17, 2011 at 4:33 PM, Michael Van Canneyt
> <michael at freepascal.org> wrote:
>> Yes.
>
> I see ... simply encoding the data differently from what I originally
> wanted and feeding it to a GET field worked fine.

Also a solution :-)

>
>> You must specify an action. A single path component is treated as an action.
>> ?module=MainPage&Action=MyAction
>
> That didn't help. Also I was not using actions before and it worked
> with GET without specifying an action.

That's because the system assumes certain defaults.

>
> I think that this part of the URL cannot be used in POST, so we would
> need another way to select the module. Although I might be wrong.

The method of determining the module/action does not depend on the method.
Either PATHINFO is used, or the module and action request variables are used.
You can perfectly do a post with an URL that contains "?module=MainPage&Action=MyAction"

Michael.



More information about the fpc-pascal mailing list