CMS-2090 Create common mechanism for requesting REST API
Added support for JQuery Deffered (promise) on ResourceRequest.