MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / formatBodyFun

Function formatBodyFun

tools/sendNotify.js:1479–1491  ·  view source on GitHub ↗
(contentType, body)

Source from the content-addressed store, hash-verified

1477}
1478
1479function formatBodyFun(contentType, body) {
1480 if (!body) return {};
1481 switch (contentType) {
1482 case 'application/json':
1483 return { json: body };
1484 case 'multipart/form-data':
1485 return { form: body };
1486 case 'application/x-www-form-urlencoded':
1487 case 'text/plain':
1488 return { body };
1489 }
1490 return {};
1491}
1492
1493/**
1494 * sendNotify 推送通知功能

Callers 1

webhookNotifyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected