수색…


발신 콜 아웃 만들기

다음은 salesforce에서 웹 서비스를 호출하는 방법에 대한 예제입니다. 아래 코드는 data.gov에서 호스팅되는 REST 기반 서비스를 호출하여 우편 번호에 가까운 농민 시장을 찾습니다.

조직에서 HTTP 콜 아웃을 호출하려면 조직의 원격 설정을 조정해야합니다.

string url= 'http://search.ams.usda.gov/farmersmarkets/v1/data.svc/zipSearch?zip=10017';
Http h = new Http();
HttpRequest req = new HttpRequest();
HttpResponse res = new HttpResponse();
req.setEndpoint(url);
req.setMethod('GET');
res = h.send(req);
System.Debug('response body '+res.getBody());


Modified text is an extract of the original Stack Overflow Documentation
아래 라이선스 CC BY-SA 3.0
와 제휴하지 않음 Stack Overflow