RequestBuilder builder = new RequestBuilder(RequestBuilder.GET, "http://localhost:8080/slim_prueba_3.0/services.php/hola");
try
{
builder.sendRequest(null, new RequestCallback()
{
@Override
public void onResponseReceived(Request p_request, Response p_response)
{
if (p_response.getStatusCode() == Response.SC_OK)
{
new VentanaMensaje().showWarning("onResponseReceived " + p_response.getText() + " (OK)");
btnIngresar.enable();
}
else
{
new VentanaMensaje().showWarning(" onResponseReceived " + p_response.getText() + " (" + p_response.getStatusCode() + ")");
}
}
@Override
public void onError(Request p_request, Throwable p_e)
{
new VentanaMensaje().showWarning("Error");
}
});
}
catch (RequestException e)
{
new VentanaMensaje().showWarning("Excepcion");
}
Request headers
Host: 127.0.0.1:8888
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0
Accept: /
Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://127.0.0.1:8888/principal.html
Connection: keep-alive
Response headers
Date: Thu, 12 Jan 2017 19:47:59 GMT
Content-Type: text/html; charset=ISO-8859-1
Cache-Control: must-revalidate,no-cache,no-store
Content-Length: 340
This is a minimal example using CORS https://github.com/ibaca/autorest-streaming-example/blob/master/server/src/main/java/com/intendia/gwt/example/Main.java#L95
Also, in chrome it is quite easy fix it, because it explain what header is required to make it work. Not sure if Firefox errors are as descriptive as chrome.
It looks like you have a cross-origin issue (localhost:8888 vs localhost:8080), and CORS would help.
--
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-tool...@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.