I'm currently working on a project that involves calling an API in XML format, but I'm having trouble getting any data to show up.
So far, I've attempted to use both JavaScript and TypeScript for making the HTTP request, as well as trying out fetch. It seems like my code might not be correct.
httpModule.request({
url: "http://api.rideuta.com/SIRI/SIRI.svc/VehicleMonitor/ByRoute?route=3&onwardcalls=true&usertoken=UTBPQBLBFV7",
method: "GET"
}).then((res) => {
// The response argument is of type HttpResponse
console.log(res);
}, (e) => {
console.log(e);
});
My main goal is just to get some basic data to display or return.