Mailinglist Archive: yast-devel (163 mails)

< Previous Next >
Re: [yast-devel] WebYaST: how to pass empty string to rest-service?
  • From: Klaus Kaempf <kkaempf@xxxxxxx>
  • Date: Wed, 16 Sep 2009 10:33:18 +0200
  • Message-id: <20090916083318.GA17673@xxxxxxxxxxxxx>
* Martin Vidner <mvidner@xxxxxxx> [Sep 16. 2009 10:19]:
On Wed, Sep 16, 2009 at 09:47:46AM +0200, Jiří Suchomel wrote:
Hi,
in administrator module I have a POST request from client that contains the
information about root password and mail aliases. Sometimes I would like to
pass an empty value (for mail aliases, to reset it to no alias) and to
distinguish the empty value from nil (nil has a meaning do not try to save
this, while empty means save empty).

Rails will not let you :-(
at least for hash values.

And even REST does not define this afaik.

The payload for a POST request usually contains the complete instance
(i.e. all attributes). The distinction of 'nil' (no change) vs. 'empty'
(write empty value) is usually done on the service side, comparing the
new with the current value and only writing changes.

Klaus
---
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)

--
To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups