I've been trying to add Last-Modified Header via the following code in a Filter
afterHandle method
Form responseHeaders = (Form)
response.getAttributes().get(org.restlet.http.headers);
if (responseHeaders == null)
{
responseHeaders = new Form();
probably meant to do is use setModificationDate(new
Date()) on the entity/response representation. ie.
representation.setModificationDate(new Date());
Jon
Sherif Ahmed wrote:
I've been trying to add Last-Modified Header via the following code in a
Filter afterHandle method
Form
Brilliant..
The more I use Restlet the more I am liking it indeed.
Now does Restlet has a framework to take care of Gzip encoding results when the
Request headers indicate that the request is from a client that supports this
encoding (all modern browsers do)
I've been trying to add
Cool,
This works as you indicate. However implementing this way has a downside. Would
be nice that the framework could take care of sending a 304 even without having
to get a concrete Representation which has a date set.
The idea is to avoid creating a Representation if the Resource has not
Okay..
I had to add an XLS Representation for a resource and I wan to support a suffix
of .json for JSON and .XLS for Excel , but using the code below (and rest of
the code in the previous thread).
no matter what extension I use (even other than XLS OR JSON). the
Variant.Representation in my
5 matches
Mail list logo