L
L
Lolut2018-06-28 22:03:31
Node.js
Lolut, 2018-06-28 22:03:31

Can't make a request?

Outputs undefined. What's wrong?

const request = require('request');

request({
  url: 'https://maps.googleapis.com/maps/api/geocode/json?address=13551%20lombard%20street%newyork',
  json: true
}, (error, response, body) => {
  console.log(body);
});

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav, 2018-06-29
@ms-dred

Not like
that

request.get({
или 
request.post({

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question