Please find below the code I am using:

Http http = new Http();
HttpRequest request = new HttpRequest(); 
String url='http://abc:8090/part/abc/abc/';
HttpResponse response = http.send(request);

I am able to access the url in the browser and I have added the base url in the Remote site settings too. But the above code does not call the web service. The reponse I get is

Response:System.HttpResponse[Status=Service Unavailable, StatusCode=503]

And when I change the url to 'https://th-apex-http-callout.herokuapp.com/animals' It works perfectly well.

Could anyone please help me if there is anything wrong with the url?


1 Answer 1


Hi @NewSalesforceDev,

Your organization/Customer white-listed you network IP address. Hence it is accessible when you hit the URL(http://abc:8090/part/abc/abc/) in your browser (from your organization or from your VPN connection).

This URL is not accessible by other public IP's (including Salesforce IP's). You can test this by hitting the same URL from your home network(without connecting to your customer network. This URL will not be accessible).

Solution: Ask your Customer Network team to whitlist the Salesforce IP's. Provide the Salesforce Ip list to your Customer Network team from the below URL.


Thanks, Syed

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .