@pnp/sp
Version:
pnp - provides a fluent api for working with SharePoint REST
23 lines • 846 B
JavaScript
import { op, get, post, patch, del } from "@pnp/queryable";
export const spGet = (o, init) => {
return op(o, get, init);
};
export const spPost = (o, init) => op(o, post, init);
export const spPostMerge = (o, init) => {
init = init || {};
init.headers = { ...init.headers, "X-HTTP-Method": "MERGE" };
return spPost(o, init);
};
export const spPostDelete = (o, init) => {
init = init || {};
init.headers = { ...init.headers || {}, "X-HTTP-Method": "DELETE" };
return spPost(o, init);
};
export const spPostDeleteETag = (o, init, eTag = "*") => {
init = init || {};
init.headers = { ...init.headers || {}, "IF-Match": eTag };
return spPostDelete(o, init);
};
export const spDelete = (o, init) => op(o, del, init);
export const spPatch = (o, init) => op(o, patch, init);
//# sourceMappingURL=operations.js.map