I am working on a GWT application that makes a REST request for binary data. I am trying to use the GWT RequestBuilder. The problem is that the answer only offers the getText () method.
Here is a simple example that reproduces the problem:
private static void sendRequest() { String url = URL.encode("/object/object_id"); RequestBuilder requestBuilder = new RequestBuilder(RequestBuilder.GET, url); try { requestBuilder.sendRequest("", new RequestCallback() { @Override public void onResponseReceived(Request request, Response response) { String data = response.getText();
The problem is that GWT encodes the response data as String in (as it seems to me) the default platform encoding. Is there a way to get data before GWT converts it to String?
source share