
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
remote-json
Advanced tools
Node.js HTTP/HTTPS client for JSON APIs. Supports GET, PUT, POST, DELETE and PATCH methods.
npm install('remote-json')
var remote = require('remote-json');
remote('http://echo.jsontest.com/key/value/name/Bob')
.get(function (err, res, body) {
console.log(res.statusCode); // 200
console.log(body); // {"name": "Bob", "key": "value"}
});
Returns a new instance of Remote object with JSON API's methods.
url - A full URL string.opt - A HTTP options object.Returns a function for GET method.
path - Optional. A path which will be added to the URL.data - Optional. A data wich will be send with request.callback - Callback function.Many paths at one remote:
var remote = remote('http://json.api');
remote.get('/users', callbackUsers);
remote.get('/books', callbackBooks);
Send data on request:
remote.get('/users', {id: 123}, callback);
remote.get('/users', {id: 78}, callback);
Usage for these methods is equal to the one of the .get method.
According to the standard, the MIME media type for JSON text is application/json. This module checks if the type is valid. You may enable any other type to pass the validation, e.g.:
remote.contentTypes['text/javascript'] = true;
Pass it to the constructor:
remote('http://json.api', {
headers: {
Cookie: 'Your cookie'
}
});
This client doesn't follow redirects. Use the follow-redirects module for this:
remote.http = require('follow-redirects').http;
remote.https = require('follow-redirects').https;
npm test
The tests use online services:
They may be down for the momemnt you test this module.
FAQs
HTTP/HTTPS client for JSON APIs
We found that remote-json demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.