I'm using NodeJS in my application, I'm trying to call API service to get the token from the server. While I'm making any request from the NodeJS file I'm getting "ECONNRESET" error. I've tried with some API , which reflects the same error. Below is my code
import request = require('request');
request('https://postman-echo.com/get?foo1=bar1&foo2=bar2', (err,result,body){
console.log(body);
});
The above is my code which I've tried with sample API. When I'm trying to run this code I'm getting
Error: read ECONNRESET
at TLSwrap.onstreamread( interal/stream_base_common.js:207:27 {
error: -4077,
code: ECONNRESET,
syscall: read
}