Ajax not working to local computer ip address

I have a working app which seems to work fine to my main server but I am trying to work locally for better debugging and I have a cordova app running with framework7, using this as the guts:
app.request.postJSON(
fitUrl+’/restapi/fitapp/testConnection’,
str,
function(data,status,xhr) { … } //success
function(xhr, status, message) { // error
alert(status + " : " + JSON.stringify(xhr));
var str = “Message:”+message+" - Unable to connect (2) to " + Dom7("[name=fitUrl").val() + “

” + “a href=’#’ onclick=‘tryConnect(true);’>”+xhr.response+"";
errorToast(str); // not sure why str is needed but there is an error without
}
);

I am hitting the error function consistently when I use an IP address on android. I am not getting a good error message, so I am wondering if it is something to do with security or cors? Proper url to other machines work but not the ip for some reason. I have in the config.xml and allow-intent as recommended in whitelist plugin. I wondered if there was a way to get better error message or a setting for local connection. I am using the IP of the computer connected to the phone. I think that should be fine?

When I paste the url in a browser on the phone, it works fine. Originally I thought it was because there was a port after the ip address but I changed to port 80 (with no port) and still not working.