+ 11
How to non-remotely connect to server using Node?
How to non-remotely connect to a internet server using Node? Just like how browser access a site, how to make node JS do that? Note that, both requests(post/get) should be able to be done and specific headers should also be possible to sent and that's non-remotely! Just like how browser does. I've tried to connect my localserver (it has config if no remote access) using Node. Using browser, it's working server. Using Node, it doesn't connect like a browser? Server returns runtime error--- non-remote access only, use browser. Why? How to solve it?đ
5 Answers
+ 7
Checker 8763
There's nothing like XMLHttpRequest in node JS.
Third party apps can help node to stimulate browser.
But instead of that, I want to make it like a browser itself.
(I'm not talking about processing HTML CSS AND JAVASCRIPT executing and evaluating)
+ 2
I don't exactly know but what you mean but maybe xmlhttprequest is what xou are looking for.
+ 2
Spaceđłđ” {{It Starts, it ends!}}ă
€ă
€ă
€ă
€ă
€ă
€ă
€ă
€ă
€ă
€ă
€ă
€ă
€ă
€ So are you looking for a nodejs XMLHttpRequest equivalent? For that you'd use the http(s) built-in library, or a third party library (for example I like node-fetch off npm, it wraps the built in modules to copy the browser fetch api).
You can mention me if you want some examples of http requests in node.
+ 2
Try to type in the IP of your Server in the Browser. It might have a GUI Server
0
Qale s