Module: RestOperationFactoryΒΆ
creates an operation instance (a RestOperation) that can be used for chained operation. {RestOperation} instances can be generated by this method, or reused from the incoming request, but a restOperation is required to make outgoing REST requests
// use a new instance of RestOperation to send a GET request
var eventChannel = require("./bootstrap/setupEventChannel")();
var setupRestOperationFactory = require("./infrastructure/restOperationFactory");
var restOperationFactory = setupRestOperationFactory({"eventChannel": eventChannel});
var sendGet = function (Url1) {
var restOp = restOperationFactory.createRestOperationInstance()
.setUri(Url1)
.setContentType("text/plain")
return this.restRequestSender.sendGet(restOp);
};