Mailinglist Archive: yast-devel (233 mails)

< Previous Next >
[yast-devel] WebYaST: responding XML to an HTML request
  • From: Klaus Kaempf <kkaempf@xxxxxxx>
  • Date: Thu, 15 Oct 2009 15:28:17 +0200
  • Message-id: <20091015132817.GA22664@xxxxxxxxxxxxx>

a couple of service controllers return XML to an HTML request. This is
usually done as

respond_to do |format|
format.html { render :xml => ... } #return xml only

As coded above, the HTTP reply header reports "text/html" with the
reply body containing XML.
This is wrong and not RESTful (can we say RESTless ? ;-))

The service should always respond with a resource representation that
was requested from the client. If this is not possible, a default
representation (i.e. json) should be choosen.

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