var client = restify.createClient({
url: "https://api.mercadolibre.com"
});
search = function(response, name, store_id, limit, offset) {
client.get("/sites/MLA/search?q=cartera&seller_id=156853713&limit=10&offset=0", function (err, req) {
assert.ifError(err); // connection error
var str = ''
req.on('result', function (err, v_res) {
assert.ifError(err); // HTTP status code >= 400
v_res.on('data', function (chunk) {
str += chunk;
});
v_res.on('end', function () {
response.send(str)
});
});
});
}
with the following error: ECONNRESET.