G
G
gloribus2016-04-01 15:03:56
PHP
gloribus, 2016-04-01 15:03:56

How to send a request to nodejs?

I have a nodejs server on vps, port 5000. How do I send a get(post) request to it?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Dmitry Eremin, 2016-04-01
@gloribus

https://www.getpostman.com/
Special thing for such things

A
AlexLIn, 2016-04-01
@AlexLIn

var xhr = new XMLHttpRequest();
xhr.open('GET', "http://ipinfo.io/json", true);
xhr.send();

or
$.get( "http://ipinfo.io/json", function( data ) {
  $( ".result" ).html( data );
  alert( data.ip );
});

with jQuery

D
Daniil Igorevich, 2016-04-01
@Petr_Anisimov

putty
request module

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question