function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found

Hi All, 
I am trying to access this endpoint URL ( from salesforce by using REST API code, Please see the below code  . when i execute I m getting this issue "System.CalloutException: Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found"

Note : But the same URL, If i tried to access from the browser. I m getting successfull response.

Any one please let me know , what was the issue here ????

Code :
Http h = new Http();
  HttpRequest req = new HttpRequest();
  String Url = '';

    req.setHeader('Content-Type', 'application/json');

  // Getting error here          
   HttpResponse res = h.send(req);
   String result = res.getBody();
   system.debug('RESULT ::: '+result);
Is the server you are trying to hit behind a proxy? If so you will need to enable access to that server through the proxy for the salesforce IPs. If you goto you can see the list of IPs that will need whitelisting in the proxy server.