Good day.

The First Resource app has code similar to this for setting the location of created resource:

String entity = "Items created";

Representation rep = new StringRepresentation(entity, MediaType.TEXT_PLAIN); rep.setIdentifier(getRequest().getResourceRef().getIdentifier() + "/" + so.getId().toString());
getResponse().setEntity(rep);
...

However, my app, that does something similar, has no need to set an actual entity value. So I set entity="", but which results in this warning on the server side when the response is returned:

WARNING: A response with an unavailable entity was returned. Ignoring the entity for resource "http://localhost:8182/log/AVal

I'd rather not return an entity with nonzero length if no agent will use it - and no agent of mine does.

How should I handle this, all the while avoiding the warning in the server log?

Thanks.

Reply via email to