You need to sign in to do that
Don't have an account?
SS Karthick
Real time example for REST apex callout
Hi folks,
Can anyone give me the real time example for apex REST callout
I wanna like
enpoint url and apex code for real time apex callout
Thanks in advance
Karthick
Can anyone give me the real time example for apex REST callout
I wanna like
enpoint url and apex code for real time apex callout
Thanks in advance
Karthick
String endPointUrl = 'https://www.google.com/search?q=site:linkedin.com+linkedin+Employee+Size';
Http h = new Http();
HTTPRequest req = new HTTPRequest();
HTTPResponse resp = new HTTPResponse();
req.setHeader('Content-Type', 'application/xml');
req.setEndpoint(endPointUrl);
req.setMethod('GET');
resp = h.send(req);
String response='';
response = resp.getBody();
system.debug('Response='+response);
Dont forgot to add "https://www.google.com" in your remote site setting.
Let me know if it is heplful.
All Answers
String endPointUrl = 'https://www.google.com/search?q=site:linkedin.com+linkedin+Employee+Size';
Http h = new Http();
HTTPRequest req = new HTTPRequest();
HTTPResponse resp = new HTTPResponse();
req.setHeader('Content-Type', 'application/xml');
req.setEndpoint(endPointUrl);
req.setMethod('GET');
resp = h.send(req);
String response='';
response = resp.getBody();
system.debug('Response='+response);
Dont forgot to add "https://www.google.com" in your remote site setting.
Let me know if it is heplful.
can you give me the same for post method ?
Thanks in advance
Karthick
Hit the Like link, if it was helpful.
can u clear please with simple example