我需要从自定义 REST 端点调用补丁方法。
我在 MarkLogic 文档中搜索并找到了这个示例代码 -
function get(context, params) {
// return zero or more document nodes
};
function post(context, params, input) {
// return zero or more document nodes
};
function put(context, params, input) {
// return at most one document node
};
function deleteFunction(context, params) {
// return at most one document node
};
exports.GET = get;
exports.POST = post;
exports.PUT = put;
exports.DELETE = deleteFunction;
我目前使用所有这些 JS 扩展,它们工作得很好。我试图以同样的方式制作补丁功能 -
function patch(context, params, input) {
return;
}
exports.PATCH = patch;
当我通过我的端点调用补丁方法时,我得到一个“405 Method Not Allowed”。MarkLogic 中是否不允许以这种方式进行补丁,这就是为什么它不包含在示例代码中?
提前致谢。