<br><div><br></div><div>I'm trying to understand how to do form submissions to a restful web service in seaside. </div><div><br></div><div>I've loaded up the restful support from seaside30addons</div><div><br></div>
<div>added these packages to the standard downloaded seaside image:</div><div><br></div><div>Seaside-Pharo-REST-Core-pmm.4.mcz<br>Seaside-REST-Core-pmm.23.mcz<div>Seaside-Tests-REST-Core-dkh.13.mcz</div><br>I rand the test cases and they all run fine. <br>
</div><div><br><br></div><div>My Html form looks like this:</div><div><br></div><div><div><html></div><div><head></div><div></head></div><div><body></div><div><br></div><div><FORM action="<a href="http://localhost:8080/rest-example/addUser" target="_blank">http://localhost:8080/rest-example/addUser</a>" method="post"></div>
<div> <P></div><div> <LABEL for="firstname">First name: </LABEL></div><div> <INPUT type="text" id="firstname"><BR></div><div> <LABEL for="lastname">Last name: </LABEL></div>
<div> <INPUT type="text" id="lastname"><BR></div><div> <LABEL for="email">email: </LABEL></div><div> <INPUT type="text" id="email"><BR></div>
<div> <INPUT type="radio" name="sex" value="Male"> Male<BR></div><div> <INPUT type="radio" name="sex" value="Female"> Female<BR></div>
<div> <INPUT type="submit" value="Send"> <INPUT type="reset"></div><div> </P></div><div> </FORM></div><div><br></div><div></body></div></div><div><br></div>
<div><br></div><div>I enter data for each field in the form, set the radio box to "Male" and do the submit. </div><div><br></div><div>I have a break point set in my method </div><div><br></div><div><div>addUser</div>
<div><span style="white-space:pre-wrap">        </span>|aRequest postFields |</div><div><span style="white-space:pre-wrap">        </span><POST></div><div><span style="white-space:pre-wrap">        </span><Path: '/addUser'></div>
<div><span style="white-space:pre-wrap">        </span><Consumes: 'application/x-www-form-urlencoded'></div><div><span style="white-space:pre-wrap">        </span>aRequest := self requestContext request.</div>
<div><span style="white-space:pre-wrap">        </span>postFields := aRequest postFields.</div><div><span style="white-space:pre-wrap">        </span></div><div><span style="white-space:pre-wrap">        </span>self halt.</div>
<div><span style="white-space:pre-wrap">        </span>Transcript show: 'Got it'; cr.</div></div><div><br></div><div>When inspected, postFields has exactly one element which is:</div><div><br></div><div>
a WARequestFields('sex'->'Male')</div><div><br></div><div>Inspect the body and I get:</div><div><br></div><div>'sex=Male'</div><div><br></div><div>what happened to my form elements???</div><div>
<br></div><div><br></div><div>Tony</div><div><br></div><div><br></div><div><br></div>