@sap/xsodata
Version:
Expose data from a HANA database as OData V2 service with help of .xsodata files.
21 lines (17 loc) • 652 B
JavaScript
;
module.exports = NetworkContext;
/**
* Contains the context for a network request-response cycle
* E.g. when processing several request-response cycles within $batch this network context is the
* same for all batch request-response cycles
* @constructor
*/
function NetworkContext(handlerConfiguration, requestOptions) {
this.lastUsedRequestID = 0;
this.handlerConfiguration = handlerConfiguration;
this.requestOptions = requestOptions;
this.uniqueNetworkRequestID = handlerConfiguration.getNextNetworkRequestID();
}
NetworkContext.prototype.getNextRequestID = function() {
return this.lastUsedRequestID++;
};