Reputation: 5
Please tell me how to get json response? I get base4 by example:
// Using Node.js 14.x +
// use "lib" package from npm
const lib = require('lib')({token: null /* link an account to create an auth token */});
// make API request
let result = await lib.http.request['@1.1.6'].get({
url: null // required
});
https://autocode.com/lib/http/request/#get
Upvotes: 0
Views: 84
Reputation: 16
Using axios package will be easier. It's default response type is json.
const axios = require('axios');
let result = await axios.get('your_url')
});
Upvotes: 0