You need to sign in to do that
Don't have an account?
shikher goel
Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found
Hi All,
I am trying to fetch the Salesforce Objects Schema from some other Sandbox. To achieve this ,i am trying to connect salesforce with REST API using this below code :
try{
Http h = new Http();
HttpRequest request= new HttpREquest();
String endPointURL = 'https://c.cs15.salesforce.com/services/data/v34.0/sobjects';
request.setHeader('Authorization', 'Bearer '+ UserInfo.getSessionId());
request.setEndPOint(endPointURL );
request.setbody(endPointURL );
request.setMethod('GET');
HttpResponse hres = h.send(request);
response = hres.getBody();
}catch(exception exc)
{
system.debug('EXc is '+exc);
response = exc.getMessage();
}
But I am getting the error as "Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found".
As far I know this is because of firewalls.but i want to add proxy into my code.
Can someone know,how can we add proxy in apex.???
I am trying to fetch the Salesforce Objects Schema from some other Sandbox. To achieve this ,i am trying to connect salesforce with REST API using this below code :
try{
Http h = new Http();
HttpRequest request= new HttpREquest();
String endPointURL = 'https://c.cs15.salesforce.com/services/data/v34.0/sobjects';
request.setHeader('Authorization', 'Bearer '+ UserInfo.getSessionId());
request.setEndPOint(endPointURL );
request.setbody(endPointURL );
request.setMethod('GET');
HttpResponse hres = h.send(request);
response = hres.getBody();
}catch(exception exc)
{
system.debug('EXc is '+exc);
response = exc.getMessage();
}
But I am getting the error as "Unable to tunnel through proxy. Proxy returns "HTTP/1.0 404 Not Found".
As far I know this is because of firewalls.but i want to add proxy into my code.
Can someone know,how can we add proxy in apex.???
https://yoafzal.wordpress.com/tag/reverse-proxy/
http://salesforce.stackexchange.com/questions/67892/webcallout-through-proxy