Skip to content

πŸ› Bug Report β€” Runtime APIs - Body does not get POSTED when using httpsΒ #5078

@MatthewSteeples

Description

@MatthewSteeples

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions