({ handleResponse: function(component, event, helper) { var response = event.getParam("response"); var status = response.status; var statusCode = response.statusCode; var body = response.body; // do something interesting... // console.log(body); }, setPath: function(component, event, helper) { var selectElem = component.find("reportId").getElement(); var reptId = selectElem.options[selectElem.selectedIndex].value; var restCmp = component.find("restCmp"); restCmp.set("v.path", "/services/data/v32.0/analytics/reports/" + reptId + "/describe"); var a = restCmp.get("c.makeRequest"); $A.enqueueAction(a); }, describeTheReport: function(component, event, helper) { var componentConfig = { componentDef : "markup://paura:restRequest", attributes : { values : { path : "/services/data/v32.0/analytics/reports/00Oi0000006qd21/describe", } } }; $A.componentService.newComponentAsync( this, function(newCmp) { newCmp.addHandler("restResponseEvent", component, "c.handleResponse"); var a = newCmp.get("c.makeRequest"); $A.enqueueAction(a); }, componentConfig ); } })