Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public PageReference find() {
- HttpRequest req = new HttpRequest();
- HttpResponse res = new HttpResponse();
- Http http = new Http();
- String url = 'http://clozer.3spire.net/public/user/'+strTag+'/'+cities;
- req.setEndpoint(url);
- req.setMethod('GET');
- //these parts of the POST you may want to customize
- req.setCompressed(false);
- req.setBody('key1=value1&key2=value2');
- req.setHeader('Content-Type', 'application/json');
- try {
- res = http.send(req);
- } catch(System.CalloutException e) {
- system.debug('Callout error: '+ e);
- //result = ''+e;
- }
- data = (Map<String, Result>)JSON.deserialize(res.getBody(),Map<String, Result>.class);
- lstResultWrapper = new List<ResultWrapper>();
- for(Result obj: data.values())
- {
- lstResultWrapper.add(new ResultWrapper(obj));
- }
- return null;
- }
- {"0":{"description ":"","person_name":"Justin Townsley","email":"jlt@staranchor.com","exparience":null,"location":"Unknown"},"1":{"description ":"","person_name":"Dan Anderson","email":"danandersonmobile@yahoo.com","exparience":null,"location":"Unknown"},"2":{"description ":"","person_name":"Artak Robert Melkonyan","email":"artakrobert@gmail.com","exparience":null,"location":"Unknown"},"3":{"description ":"","person_name":"Sanjay Anandaram","email":"sanjayanandaram@gmail.com","exparience":null,"location":"Unknown"},"4":{"description ":"","person_name":"Katia Gaika","email":"katia.gaika@gmail.com","exparience":null,"location":"Unknown"},"5":{"description ":"","person_name":"Sidnei Gonu008dalves","email":"sidnei.goncalves@up2place.com.br","exparience":null,"location":"Unknown"},"6":{"description ":"","person_name":"Michel Koch","email":"michelkoch@hotmail.com","exparience":null,"location":"Unknown"},"7":{"description ":"","person_name":"Shannon Lydell Carter, MBA Technolo","email":"Shannon@truegame.com","exparience":null,"location":"Unknown"},"8":{"description ":"","person_name":"Jacob Hagemann","email":"jhagemann@gmail.com","exparience":null,"location":"Unknown"},"9":{"description ":"","person_name":"Amaresh Ramaswamy","email":"amareshr@live.com","exparience":null,"location":"Unknown"}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement