Hi Sven,
I'm sending a FormData, so the right code is in
ZnDefaultServerDelegate>>#formTest3: that you pointed out. Thank you very
much.
To help other people of the list, I summarize that in case of multipart
form-data you have to read the entity and its parts, for example:
(aRequest entity partNamed: #myPartName) fieldValueString.
or also:
aRequest entity parts first fieldName.
aRequest entity parts first fieldValue
Cheers
Davide
Sven Van Caekenberghe-2 wrote
> Hi Davide,
>
>> On 16 Jun 2021, at 23:17, Davide Varvello via Pharo-users <
> pharo-users@.pharo
> > wrote:
>>
>> Hi Guys,
>> I'm posting from an http form and I'm wondering how to read data from the
>> post. It seems the request should give a ZnMultiPartFormDataEntity, but I
>> can't find how to use it.
>>
>> Can you help me please?
>> Davide
>>
>>
>>
>>
>> --
>> Sent from:
http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html>
> It depends on how the form is posted (there are two approaches).
>
> A working example of both can be found in
> ZnDefaultServerDelegate>>#formTest2: and #formTest3:
>
> ZnServerTest>>#testFormTest2: and #testFormTest3: exercise this
> functionality
>
> Basically, you just take the entity from the request and use it.
>
> HTH,
>
> Sven
--
Sent from:
http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html