質問

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?

役に立ちましたか?

解決

I'm using resty-gwt to create restfull web services but I'm not accessing it now from GWT client classes. They have documentation where it's documented.

Hope that helps.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top