On Jul 5, 2015, at 9:13 AM, Angel Rodriguez wrote:

> i would like to use native ajax to make some calls inside my node.js server.
> 
> Is this secure ?? Can i do it without problems ???
> 
> Here's and example:
> 
> .... NODE
> 
> 
> 
> app.post('/postReceptor', function(req, res, next) {
> 
>       // DATA
> 
>         var data1 = req.body['input1'];
> 
>       var data2 = req.body['input2'];
> 
>       // AJAX 
> 
>       var xhr;
> 
>       if (window.XMLHttpRequest) { // Mozilla, Safari, ...
> 
>         xhr = new XMLHttpRequest();

There's no such thing as "window" in Node. "window" is a concept used by web 
browsers.

Have you already investigated the facilities built into node for talking to 
other servers? Or the popular "request" module you can find on npm?

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/14A45B78-71E4-40AA-AB26-91D20E9C9AFC%40ryandesign.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to