@sap/xsodata
Version:
Expose data from a HANA database as OData V2 service with help of .xsodata files.
13 lines (9 loc) • 451 B
JavaScript
;
var Http405_MethodNotAllowed = require('../../utils/errors/http/methodNotAllowed');
module.exports = function checkAllowedMethodForBatch(context, callback) {
var method = context.request.method.toLowerCase();
if (method !== 'post'){
return callback(new Http405_MethodNotAllowed('The URI is not valid for non POST operation. OData batch requests must use POST.'), context);
}
return callback(null, context);
};