Sunday, November 25, 2012

JsonpRequestBuilder requestString() - does it work?

Hi,

I've got an example of JsonpRequestBuilder.send() working - but this requires us to provide an overlay type in the callback:

    new AsyncCallback<MyOverlayType>() {
        public void onSuccess(MyOverlayType result) {
        }
    }

Is there a way to instead get the raw String result from the remote server, before it gets translated into a JSON object? Something like:

    new AsyncCallback<String>() {
        public void onSuccess(String result) {
            println("Raw response from remote server is: " + result);
        }
    }

I thought maybe:

    JsonpRequestBuilder.requestString();

might do that, but doesn't seem to. In firefox, I get an error when trying that approach:

    uncaught exception: java.lang.ClassCastException
        null.a();

Thanks

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/6XeU9NqOK6MJ.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment