Mailinglist Archive: yast-devel (246 mails)

< Previous Next >
Re: [yast-devel] Re: [yast-commit] <rest-service> master : Use format instead of content type, as it seems to set the
  • From: "Duncan Mac-Vicar Prett" <dmacvicar@xxxxxxx>
  • Date: Wed, 26 Aug 2009 13:12:56 +0200
  • Message-id: <200908261312.56227.dmacvicar@xxxxxxx>
On Tuesday 25 August 2009 08:12:56 Klaus Kaempf wrote:
* Duncan Mac-Vicar P <dmacvicar@xxxxxxx> [Aug 25. 2009 00:04]:
ref: refs/heads/master
commit 72faf37c3f8dda4ab91a97f677f8833a775bded8
Author: Duncan Mac-Vicar P <dmacvicar@xxxxxxx>
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@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups
References