• Rad Elhage
  • NEWBIE
  • 0 Points
  • Member since 2014

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
How can I create a form on my salesforce site that when it is submitted it is email to the responsible group? 

Hi Devs,

 

I want to connect with my localhost .for that i use "http:localhost:9000" in htpprequest in apex. It shows service unavailable error.

Apex is run in salesforce server ,so it doesnt any response to me.

 

Is there any other way to do this.

 

Please help regarding this.

 

 

//My Http request 

Http http  = new Http(); 
        HttpRequest req = new HttpRequest(); 
        req.setEndpoint('http://localhost:9000'); 
        req.setMethod('GET');
        req.setTimeout(50000);
        req.setbody(xmlStringxmlRD);
        HttpResponse res = http.send(req); 
        system.debug('&&&&res'+res);

 

my Debug log show as

 

&&&&resSystem.HttpResponse[Status=Service Unavailable, StatusCode=503]