Unable to use ServerName when using withCredentials: true?


I do a login call to my server and use withCredentials: true in the call options
If i then do this.http.post(http://<serverName> + urlEnding, body, options).map(res => res.json()) i get a 401 unauth error, but if i do this.http.post(http://<ip> + urlEnding, body, options).map(res => res.json()), it works fine
Is there any reason why this would be an issue in nativescript? Or is it a server issue?

Nativescript: 3.3.0
Tns-core: 3.3.0
Angular: 4.4.6

Something to point out is that a server name doesnt work but a fully qualified name does, EG serverName.topDomain.local


did you try
http[s]://<ip> instead of just ip?


our certs arent working atm, we’re just testing http


so that’ll be http://<ip>


yeah, thats what i put in the question


In the question you have written just <ip> without a protocol


my bad, i missed it out. I edited it in


Does your server run on any specific port other than port 80?


we dont use port 80, and its just an api for data, not a website