Hi All,

I have a specific application which needs to retrieve json as a string
from a remote server, since people want to also read the whole json
results to verify the content. I know I can do this by implementing
toString() for JavaScriptObject, but I'm wondering if there is an easy
way to do this.

I tried the requestString method in JsonpRequestBuilder class. I'm not
sure how to use this method or what the functionality of this method,
since I cannot find any documentation about it.

My code is as follows and it doesn't work. So I'm wondering how to use
this method. If there is another simple way to retrieve the json as
string from a remote server, please advise. Thanks a lot

JsonpRequestBuilder jsonp = new JsonpRequestBuilder();
String url = "http://localhost:8000";;
jsonp.requestString(url, new AsyncCallback<String>(){
    public void onFailure(Throwable caught){
        Window.alert("Failure:" + caught.getMessage());
    }

    public void onSuccess(String price){
        Window.alert("Data:" + price);
     }
});

Shane

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to