Fix bug 34595 use similar response structure from getResource to return proper object type, modified RESTRequest to use custom headers with makeRequest similar to prepAndSend