Wednesday, May 2, 2018

Re: Advice needed - url request

Don't send the request to the other server directly from the client. You will have problems with cross-origin content.

Client side should request to GWT's server side to fetch content from the other server and return it as the result of  a standard RPC or JSON request. GWT's server portion is not running in the user's browser, cross-origin restrictions don't apply.

Hope this helps,
Rodolfo 


On Wed, May 2, 2018 at 8:10 AM Hossein Amerkashi <kkashi01@gmail.com> wrote:
@Thomas

Thanks for the info. Having couple of issues:
  1. I'm posting request to another server and having issue because of cross-origin. I verified this by forcing browser to allow to allow connection
  2. This is async call. So, if I try to send request and based on that return text-result; it won't work. I have a method that includes (has return value). The caller immediately receives the return before the request has completed its call. I think I need to think of another approach. Any suggestions?

Thanks

On Tuesday, May 1, 2018 at 1:27:13 PM UTC-4, Thomas Broyer wrote:
Hi,

Have a look at http://www.gwtproject.org/doc/latest/DevGuideServerCommunication.html#DevGuideHttpRequests

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment