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

Function formatBodyFun

sendNofity.js:1483–1495  ·  view source on GitHub ↗
(contentType, body)

Source from the content-addressed store, hash-verified

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

Callers 1

webhookNotifyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected