@sap-cloud-sdk/odata-common
Version:
SAP Cloud SDK for JavaScript common functions of OData client generator and OpenAPI clint generator.
33 lines • 1.35 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GetRequestBuilderBase = void 0;
const util_1 = require("@sap-cloud-sdk/util");
const request_builder_base_1 = require("./request-builder-base");
/**
* @internal
*/
class GetRequestBuilderBase extends request_builder_base_1.MethodRequestBuilder {
/**
* Creates an instance of GetAllRequestBuilder.
* @param _entityApi - Entity API for building and executing the request.
* @param requestConfig - Request config of the get all or get by key request.
*/
constructor(_entityApi, requestConfig) {
super(requestConfig);
this._entityApi = _entityApi;
}
select(first, ...rest) {
this.requestConfig.selects = (0, util_1.transformVariadicArgumentToArray)(first, rest);
return this;
}
/**
* Execute request and return an {@link @sap-cloud-sdk/http-client!HttpResponse}.
* @param destination - Destination or DestinationFetchOptions to execute the request against.
* @returns A promise resolving to an {@link @sap-cloud-sdk/http-client!HttpResponse}.
*/
async executeRaw(destination) {
return this.build(destination).then(request => request.execute());
}
}
exports.GetRequestBuilderBase = GetRequestBuilderBase;
//# sourceMappingURL=get-request-builder-base.js.map