[Lazarus] fcl-web or BrookFramework queryfields array

silvioprog silvioprog at gmail.com
Fri Apr 15 21:00:50 CEST 2016


On Fri, Apr 15, 2016 at 2:47 PM, Leonardo M. Ramé <l.rame at griensu.com>
wrote:

> Hi, I need to extract the field values of a GET query of type:
>
> http://127.0.0.1/cgi-bin/test.cgi?fields[1]=f1value&fields[2]=f2value
>
> Is there a way to handle this apart from HttpRequest.QueryFields?
>

Yes.

Supposing you have an object called "TQuery" with the published property
"Fields", you can do it easily with the "TBrookParser" object. Take a look
at this demo:

http://pastebin.com/QEh5Hnen

I've been using the "Fields" property as "TStringList", but you can use any
list type, just creating a list adapter for that.

Feel free to use the Brook community
<https://plus.google.com/u/0/communities/101133820055678331036> too! :-)

Regards,
> --
> Leonardo M. Ramé
> http://leonardorame.blogspot.com


-- 
Silvio Clécio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160415/b52e0967/attachment-0003.html>


More information about the Lazarus mailing list