MCPcopy Create free account
hub / github.com/axhlzy/Il2CppHookScripts / httpPost

Function httpPost

Il2cppHook/agent/utils/http.ts:17–33  ·  view source on GitHub ↗
(url: string, postData: any)

Source from the content-addressed store, hash-verified

15
16// @notTest
17const httpPost = (url: string, postData: any) => {
18 if (!url.startsWith("http")) url = "http://" + url
19 let req = request(url, {
20 method: "POST",
21 // port: 80,
22 // path: '/upload',
23 headers: {
24 'Content-Type': 'application/json',
25 'Content-Length': Buffer.byteLength(postData),
26 'Content-Encoding': 'gzip'
27 }
28 }, (res: IncomingMessage) => {
29 res.setEncoding('utf8');
30 res.on("data", (chunk) => LOGD(chunk))
31 })
32 req.write(postData)
33}
34
35export { httpGet, httpPost }
36

Callers

nothing calls this directly

Calls 2

writeMethod · 0.80
LOGDFunction · 0.70

Tested by

no test coverage detected