• Adrian Camua 21
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hi,

Is there an easy way to confirm that my Salesforce org has access to an external endpoint? Just needing to simulate a call coming in from a Salesforce IP.

I have added the endpoint to the remote site settings also, and I've tried executing the below
 
Http http = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint('http://www.yourendpoint.com');
req.setMethod('POST'); // you could also set this to 'GET' and remove the next line
req.setBody('body of the request');

HttpResponse response = http.send(req);
System.debug('BODY: ' + response.getBody());
System.debug('STATUS: ' + response.getStatusCode());
(replacing the placeholder endpoint url in the code with that of the external system - same one in the remote site setting)

However I'm getting an error message:

System.CalloutException: Read timed out

Any ideas?
Hi,

Is there an easy way to confirm that my Salesforce org has access to an external endpoint? Just needing to simulate a call coming in from a Salesforce IP.

I have added the endpoint to the remote site settings also, and I've tried executing the below
 
Http http = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint('http://www.yourendpoint.com');
req.setMethod('POST'); // you could also set this to 'GET' and remove the next line
req.setBody('body of the request');

HttpResponse response = http.send(req);
System.debug('BODY: ' + response.getBody());
System.debug('STATUS: ' + response.getStatusCode());
(replacing the placeholder endpoint url in the code with that of the external system - same one in the remote site setting)

However I'm getting an error message:

System.CalloutException: Read timed out

Any ideas?