Start a new topic

Custom Endpoint request module not working

When I copy the example for getting data from an external API from the kinvey docs: 


 

    var req = modules.request;
    req.get('http://developer.mbta.com/Data/Red.json', function(error, resp, body){
        if (error){
            response.body = {error: error.message};
            response.complete(400);
            return;
        }
        response.body = JSON.parse(body);
        response.complete(resp.status);
    });

If I try and use this and then test the endpoint using the built in tester I get an error of code: "ECONNRESET"


Any help would be appreciated.

1 Comment

Hello Cameron,


It seems the URL [http://developer.mbta.com/Data/Red.json] which you are using is not working any more.

I have replaced the URL with working URL, tested the same code using  Custom Endpoint BL built in Tester and its working .


Please let us know if you have more questions on this !


Thanks & Regards,

Akhil DT
Technical Support Engineer
https://support.kinvey.com/

image


Login or Signup to post a comment