How do i use GWT Request builder to pass on a String from my GWT code to a website www.xyz.com.It would be greatly helpful if i can get the code for doing this.
Thanks
How do i use GWT Request builder to pass on a String from my GWT code to a website www.xyz.com.It would be greatly helpful if i can get the code for doing this.
Thanks
In order to make cross-domain XHR requests, you need to use JsonpRequestBuilder
, which is pretty well documented in its comments.
Feel free to ask a more specific question if you encounter any specific problems.
If you want to just send a string, then you can do something simple like add an Image
/<img>
with src
pointing to www.xyz.com
+ the string you want to send - the src won't be pointing to an image actually (of course), it's just that you can sidestep SOP (Same Origin Policy). Of course, you have to handle the requests for "the image" appropriately on www.xyz.com
(and make sure the broken image is hidden/not shown on the client side).
Anyway, that's the basic idea - a <script>
tag would work too.