I want to collect/get that JSON data from google cloud and create a case in salesforce.
I have tried using this class but not sure it is not working. How to get a .json file from another server and create case on salesforce.
Apex class:
HttpResponse res=new HttpResponse();
HttpRequest req = new HttpRequest();
req.setMethod('GET');
req.setEndpoint('https://console.cloud.google.com/');
req.setHeader('Content-Type', 'application/json');
Http h = new Http();
res= h.send(req);
system.debug('res::>'+res.getBody());
string result= res.getbody();
wrapper = (IOT_CaseWrapper) JSON.deserializeStrict(res.getBody(), IOT_CaseWrapper.class);
system.JSONParser parser=JSON.createParser(result);
system.debug('@@@@@@@@@@The parser value is $$$$$$$ '+parser);