📜  请求 html nodejs - Html 代码示例

📅  最后修改于: 2022-03-11 14:53:06.540000             🧑  作者: Mango

代码示例1
const request = require('request');

request('https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY', { json: true }, (err, res, body) => {
  if (err) { return console.log(err); }
  console.log(body.url);
  console.log(body.explanation);
});