Issue #1403 has been updated by adam.
You likely can look at the source for Merb to get a pretty good idea of how to structure this kind of negotiation. At a minimum, I think you should support: 1) Accept header parsing, with weight preferences. Some working perl code available at: http://search.cpan.org/src/JSHIRLEY/Catalyst-Action-REST-0.62/lib/Catalyst/Request/REST.pm - you should be able to translate the gist to Ruby fairly easily. 2) Direct object serialization via a provides style semantic, a-la Merb. Allow keywords to register for a content-type (say 'application/json' == :json), which corresponds to :to_json and :from_json methods. In general, have I mentioned that merb rocks this? Adam ---------------------------------------- Feature #1403: REST connections should use content-type for format http://reductivelabs.com/redmine/issues/show/1403 Author: luke Status: Accepted Priority: High Assigned to: luke Category: plumbing Target version: 0.25.0 Keywords: rest, html, http, content-type Complexity: Medium Patch: None Affected version: 0.24.4 Currently, the REST plumbing has yaml hard-coded. This introduces unnecessary overhead for those classes that could be transferred as plain text (e.g., certificates and most files), and it reduces flexibility in providing better language agnosticism. We need to create some kind of content-type framework that makes it easy to determine whether a given class supports a given content type, and then support built-in HTML content-type handling to select the appropriate type. ---------------------------------------- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://reductivelabs.com/redmine/my/account --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/puppet-bugs?hl=en -~----------~----~----~----~------~----~------~--~---
