Hi,
I use extendables library for checking if a token has expired andit works.
#include 'extendables/extendables.jsx' var http = require('http'); var url = 'http://foo.fr/mod_traffiq/getContributionModel.php?LOGIN=rhanot&CX_TOKEN=f7e240216f592fca71658caa560f910f&OP=FT' var response = http.get(url); $.write(response.body) // response: 35;token connexion expired
I want to usetheSocket objectbutit does'nt work
var reply = ""; var conn = new Socket; if (conn.open ('foo.fr:80')) { var result = conn.write ('GET /mod_traffiq/getContributionModel.php?LOGIN=rhanot&CX_TOKEN=f7e240216f592fca71658caa560f910f&OP=FT HTTP/1.1\n\n'); reply = conn.read(999999); var close = conn.close(); $.write(reply) } // response: HTTP/1.1 400 Bad Request
Thanks for your help
Regards
Ronald