+ Start a Discussion

Sent http request to instead of

I am trying to make a call out to a webconnection to an external service.  I have a program that will test to make sure the service is working.  In that program if I put it cannot connect to my webservice, but if I put it can connect to my service.  In salesforce I have tried going 

    HttpRequest req = new HttpRequest();

 What I get is an error that says System.CalloutException: no protocol:  If I put the http:// on there it just times out.  Any idea how to make salesforce not require the http or is there a different callout method?

You're trying to... ping? You'll need to actually have a service on the other end that supports http. All of salesforce's socket features are http-based (as opposed to a Berkeley socket, for example). This is why only REST and SOAP are currently supported.