Jerome Louvel wrote:
...
In your case, why would you need to manipulate headers manually? My
assumption is that most applications will not require direct access to
protocol headers. So, it is better to provide an higher-level view (via the
Call object) and leave the container and connectors deal with the
protocol-specific logic. One of the issues with the Servlet API was that
direct manipulation of headers could prevent some container optimization and
lead to portability issues.

For instance, say I wanted to implement a publish/subscribe system using HTTP. One way to do this uses header information to communicate between the publisher and subscriber -- the server may add 'X-Subscribable: URI' to any resource that can be subscribed to, the client may add a 'X-Subscriber: URI' header when it wants to subscribe to a resource.

  http://rest.blueoxen.net/cgi-bin/wiki.pl?HttpEvents#nidNL

While my final solution might be something completely different, the idea that I'm precluded from an approach because I can't read or add headers, which are core to HTTP, seems fundamentally flawed.

For example, in your sample application, you were trying to get the "Accept"
header I guess. Actually you have all the equivalent information available
via the Call.getClient() (SVN version) or via Call.getPreference() (beta
17).

Viewing the 'Accept' header was just to see what Firefox was *actually* sending, versus what Restlet interpreted it as. Given the current browser market this seems unavoidable :-)

More generally: one of the benefits of basing an application on HTTP is that the message is transparent. I think it's useful to keep this benefit even though 98% of the time we're interacting with the messages at a higher level.

Chris

--
Chris Winters ([EMAIL PROTECTED])
Lead Software Developer
Vocollect Healthcare Systems

CONFIDENTIAL, PRIVILEGED COMMUNICATION: This e-mail is private and intended for the addressee(s) only. It may contain privileged and/or confidential information. If you have received it in error you are not authorized to disseminate it in any manner; please delete it and any copies and reply to the sender that it was misdirected.

Reply via email to