I'm making some test about CORS and trying to make a POST to a server,
to make login, and the server send me a message with a 200 state ( the
login was correct ) , but the browser don't save the coockies. this is
my code:
RequestBuilder rb = new
RequestBuilder(RequestBuilder.POST, Url);
rb.setHeader("Content-type", "application/x-www-form-
urlencoded");
try {
Request response = rb.sendRequest(postData, new RequestCallback()
{
public void onError(Request request, Throwable exception) {
}
public void onResponseReceived(Request request, Response
response) {
Window.alert(response.getText());
}
});
}
catch (RequestException epa) {
Window.alert("Failed to send the request: " + epa.getMessage());
}
The response.getText() show me the "ok, you are login" but there are
no coockies en my browser with this ... If I use XMLHttpRequest() with
JSNI, the browser save it the coockies.
Any Idea... I'm getting tired about this task jeje, when I find a
way ... I will upload the code and made some guide! Lol
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
No comments:
Post a Comment