* Duncan Mac-Vicar Prett
On Tuesday 25 August 2009 08:12:56 Klaus Kaempf wrote:
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.
Good.
I don't have evidence that using format => foo adds only the extension. It may set the content-type.
It might do, if used outside of tests. Using it inside tests, bypassing the dispatcher, might have different results, i.e. requiring the :format value to be a string.
And when having the choice to alter a parameter manually or to use the API, I think we should use the API.
Agreed. However, on the receiver side, the http header is authorative, not an .xml or .json url extension. Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org