>Hi Joachim, > thanks for your feedback. Concerning the order of the values I rely solely > on the teapot error message. The way I understand your code snippet, you access the url parameters by using "at: 1". I have never used Teapot, but would be surprised if it encourages this. In HTTP world, a parameter consists of its name and value, both being Strings. > Besides I have no idea how I could make this > GET request independant from the order the HTML form generated. You shouldn't be required to do anything. In the Smalltalk web frameworks I know (Sst and Seaside mostly) an HTTPRequest object has a Dictionary like API for accessing parameters. Maybe something like "parameterAt: 'r'" should do the trick. > Maybe with Javascript? Javascript is the source of a lot of evil, but here, it is innocent like Cinderella. Normal HTTP processing still works without javascript and I hope this won't change any time soon. This is simple HTTP back and forth, no javascript required nor desired. > But I assume this simple scenario should work in teapot and I > just understand it correctly... Hmm. As I said, don't access url parameters by index, only by name. I am sure Teapot offers methods for that, in the most basic case it gives you a Dictionary or parameters, but most likely some wrapper that provides a Dictionary-esque access methods. Maybe this bit is a starting point (found here https://ci.inria.fr/pharo-contribution/job/EnterprisePharoBook/lastSuccessfulBuild/artifact/Teapot/Teapot.html):
The URL pattern may contain named parameters (e.g., <user> above), whose values are accessible via the request object. The request is an extension of ZnRequest with some extra methods.
Query parameters and Form parameters can be accessed the same way as path parameters (req at: #paramName). Teapot can perform conversions of parameters to a number, for example as follows:
Teapot on
GET: '/user/<id:IsInteger>' -> [ :req | users findById: (req at: #id)];
output: #ston;
start.-- ----------------------------------------------------------------------- Objektfabrik Joachim Tuchel mailto:jtuchel@objektfabrik.de Fliederweg 1� � � � � � � � � � � � �http://www.objektfabrik.de D-71640 Ludwigsburg http://joachimtuchel.wordpress.com Telefon: +49 7141 56 10 86 0� � � � �Fax: +49 7141 56 10 86 1