Repro code
const postData = JSON.stringify({ message: "Hello from Durable Object test" });
const result = await new Promise<string>((resolve, reject) => {
const options: https.RequestOptions = {
hostname: "webhook.site",
port: 443,
path: "/ad618452-0517-4df7-8d31-93b3633a3cc5",
method: "POST",
headers: {
"Content-Type": "application/json",
"Content-Length": Buffer.byteLength(postData),
},
};
const req = https.request(options, (res) => {
let body = "";
res.on("data", (chunk) => (body += chunk));
res.on("end", () => resolve(`status=${res.statusCode}; body=${body}`));
});
req.on("error", (err) => reject(err));
req.write(postData);
req.end();
});
The request gets sent fine but no body appears on the receiving side