" JavaScriptObject", JavaScriptObject JavaScript Java-, , "" :
public native String getFoo() ;
Whether you will use JSONP (and JsonpRequestBuilder) or a “proxy servlet” actually depends only on the features of the “service” that you need to call: JSONP is JavaScript, not JSON, so the server should return a “JSONP response script” , or you won’t be able to use JsonpRequestBuilder (and likewise, you won’t (safely) use CORS or a proxy servlet if the server returns a "JSONP script" rather than application/json).
source
share