UNPKG

846 BJavaScriptView Raw
1import { op, get, post, patch, del } from "@pnp/queryable";
2export const spGet = (o, init) => {
3 return op(o, get, init);
4};
5export const spPost = (o, init) => op(o, post, init);
6export const spPostMerge = (o, init) => {
7 init = init || {};
8 init.headers = { ...init.headers, "X-HTTP-Method": "MERGE" };
9 return spPost(o, init);
10};
11export const spPostDelete = (o, init) => {
12 init = init || {};
13 init.headers = { ...init.headers || {}, "X-HTTP-Method": "DELETE" };
14 return spPost(o, init);
15};
16export const spPostDeleteETag = (o, init, eTag = "*") => {
17 init = init || {};
18 init.headers = { ...init.headers || {}, "IF-Match": eTag };
19 return spPostDelete(o, init);
20};
21export const spDelete = (o, init) => op(o, del, init);
22export const spPatch = (o, init) => op(o, patch, init);
23//# sourceMappingURL=operations.js.map
\No newline at end of file