I have a GWT client that would like to query a RESTful service that returns text/plain
. I created a proxy interface:
public interface ConnectionStatusService extends ClientProxy
{
@Get("txt")
public void getVersion(Result<String> callback);
}
But when I'm using the generated proxy class:
ConnectionStatusService service = GWT.create(ConnectionStatusService.class);
it sends a request that accepts Accept application/x-java-serialized-object+gwt
according to Firebug, so the server returns HTTP 406 Not Acceptable of course.. :-( How could I make it accept plain text?