Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Read POST

Demonstrates how to serve an HTML form and process incoming POST requests, including handling JSON data and using request.clone() to prevent errors when accessing the request body multiple times.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Read POST

Demonstrates how to serve an HTML form and process incoming POST requests, including handling JSON data and using request.clone() to prevent errors when accessing the request body multiple times.

When To Use

Use when you need to implement a worker that accepts form submissions or JSON payloads and requires reading the request body more than once without triggering a TypeError.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-examples-read-post-workflow-guide.mdA markdown guide demonstrating how to serve an HTML form and process incoming POST requests containing JSON or form data within a Cloudflare Worker.Questions about a markdown guide demonstrating how to serve an HTML form and process incoming POST requests containing JSON or form d...
examples/workers-examples-read-post-cloudflare-workers-read-post-request.textA JavaScript example demonstrating how to read the body of an incoming POST request within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to read the body of an incoming POST request within a Cloudflare Worker.
examples/workers-examples-read-post-cloudflare-workers-read-post-request-body.textA JavaScript example demonstrating how to read the body of an incoming POST request within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to read the body of an incoming POST request within a Cloudflare Worker.
examples/workers-examples-read-post-cloudflare-workers-python-read-post-request-b.textA Python implementation demonstrating how to parse and return request body data from different content types in a Cloudflare Worker.Exact payloads, commands, or snippets shown in A Python implementation demonstrating how to parse and return request body data from different content types in a Clo...
examples/workers-examples-read-post-cloudflare-workers-rust-read-post-request.textA Rust code example demonstrating how to parse a JSON request body from a POST request using the worker crate and serde.Exact payloads, commands, or snippets shown in A Rust code example demonstrating how to parse a JSON request body from a POST request using the worker crate and serde.
examples/workers-examples-read-post-cloudflare-workers-hono-read-post-request.textA TypeScript example using the Hono framework to parse and read the body of an incoming POST request in a Cloudflare Worker.Exact payloads, commands, or snippets shown in A TypeScript example using the Hono framework to parse and read the body of an incoming POST request in a Cloudflare...

What This Skill Covers

  • Serve an HTML form, then read POST requests. Use also to read JSON or POST data from an incoming request.
  • Main sections: Tags.

Workflow

  1. Open the most relevant file under docs/ for the exact documented workflow and wording.
  2. Open schemas/ files for exact structured contracts.
  3. Open examples/ files for concrete requests, commands, snippets, and manifests.
  4. Do not add behavior or configuration that is not present in the attached source files.

Canonical source: https://developers.cloudflare.com/workers/examples/read-post