Protocols such as ftp, telnet, and http lack modern capabilities to transmit information securely and reliably. It is recommended that you switch to more secure and robust protocols such as https and ssh. Additionally, it is also recommended that endpoints and resources be not mentioned in clear text and that suitable alternative methods be used.
var endpoint = "http://www.foo.com/api/bar";
var endpoint = "https://www.foo.com/api/bar";