From: Bruce F. <Bruce@Fitzsimons.org> - 2006-04-23 08:15:24
|
Peoples, I'm coding a few screens in yaws, and I think this would be basically useful for those of us who use the same screen for display and processing edits. It also has the benefit that you can convert any POST to a GET or v/v although you'd probably want to throw in a urldecode on the output if you want to rely on this ability. getvar(ARG,Key) when atom(Key) -> getvar(ARG, atom_to_list(Key)); getvar(ARG,Key) -> case (A#arg.req)#http_request.method of 'POST' -> postvar(Arg, Key); 'GET' -> queryvar(Arg, Key); _ -> undefined end. Any objections? /Bruce |