On Tuesday 25 August 2009 08:12:56 Klaus Kaempf wrote:
* Duncan Mac-Vicar P <dmacvicar@suse.de> [Aug 25. 2009 00:04]:
ref: refs/heads/master commit 72faf37c3f8dda4ab91a97f677f8833a775bded8 Author: Duncan Mac-Vicar P <dmacvicar@suse.de> Date: Tue Aug 25 00:01:33 2009 +0200
Use format instead of content type, as it seems to set the content type too.
Hmm, this looks 'fishy' to me. Actually, both ways (@request.accept and setting :format) should work. The (http-wise and restful) correct way is setting the http 'accept' header to the list of mime types (yes, there can be multiple) acceptable by the client. The server is then free to choose one of them.
I just tried both (setting the content type header) manually and using the API (passing format to get call) and both do the same. I don't have evidence that using format => foo adds only the extension. It may set the content-type. And when having the choice to alter a parameter manually or to use the API, I think we should use the API. -- Duncan Mac-Vicar P. - Engineering Manager, YaST SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nuernberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org