Hi Guys,

I'm _trying_ to create an HTTP request within a server side javascript file 
that asks my web application for authorization.

So I'm doing this:

function authenticateUser(params, cmd) {
Ape.log("Asking Server for authentication");

var request = new Http('http://myapp.local.dev/ape/authenticate');
request.set('method', 'POST');
request.writeData('user', params.name);
request.getContent(function(result) {
Ape.log("Server Answer: " + result);
if (result === "true") {
Ape.log("Authentication successful");
addUser(params, cmd);
} else {
      Ape.log("ERROR");
}
});
}

And it is working fine - sometimes :( Yesterday it worked the whole day, 
and today when I tried the same, without any change on the same computer 
and the same configuration, APE is not able to establish the connection.
I "debugged" the framework/Http.js and I can see that the socket callback 
functions socket.onConnect and socket.onRead are never called. It's a 
curious thing, because it works one time and the other time it does not 
work.
And I even don't know how to find the reason for the problem.. Does anyone 
know how to solve this problem?

Thanks in advance for any help!

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to