You need to sign in to do that
Don't have an account?
sony sonu
rest callout through salesforce to .net application
Hi, I am requesting a service to the endpoint using REST call.
Now this endpoint url is in client network. We are passing URLs in client network which works fine.
i have configured the endpoint under Remote Site settings and trying to send the request as POST AND GET method to the endpoint via Apex class. I am getting 503 Service Unavailable response and the description of the body says 'Unable to determine IP address from host name'.
Since we this is just a HTTP URL , i tried creating a custom link and tried invoking the URL which works fine within the same app.
So I am not sure when I am able to access the endpoint URL via custom link within the app then why I am unable to access the same endpoint via Apex class?
Any suggestions would be highly appreciated.
Now this endpoint url is in client network. We are passing URLs in client network which works fine.
i have configured the endpoint under Remote Site settings and trying to send the request as POST AND GET method to the endpoint via Apex class. I am getting 503 Service Unavailable response and the description of the body says 'Unable to determine IP address from host name'.
Since we this is just a HTTP URL , i tried creating a custom link and tried invoking the URL which works fine within the same app.
So I am not sure when I am able to access the endpoint URL via custom link within the app then why I am unable to access the same endpoint via Apex class?
Any suggestions would be highly appreciated.
Did you check the same with Postman?
1st we need to connect with the local server from salesforce ...do you have any solution regarding it
HttpRequest req=new HttpRequest();
req.setEndpoint('http://myendpoingurl');
req.setMethod('GET');
req.setHeader('content-type' ,'application/json');
HttpResponse res= http.send(req);
if (res.getStatusCode() != 200) {
System.debug('The status code returned was not expected: ' +
res.getStatusCode() + ' ' + res.getStatus());
}
else {
System.debug(res.getBody());
}
>