Prompt Buddy logoPrompt Buddy

cloudflare · Cloudflare Workers Docs

Workers Post JSON

Demonstrates how to construct and send a POST request containing a JSON payload from a Cloudflare Worker to an external server using multiple programming languages.

Import to Prompt Buddy

Derived skill

Files assembled from official documentation

Viewing SKILL.md

Workers Post JSON

Demonstrates how to construct and send a POST request containing a JSON payload from a Cloudflare Worker to an external server using multiple programming languages.

When To Use

Use when you need to implement code that transmits structured data from a Cloudflare Worker to an external API endpoint via HTTP POST requests.

Reference Files

FileContainsUse For
SKILL.mdEntry point: scope, routing table, and workflow.Start here.
docs/workers-examples-post-json-workflow-guide.mdA guide and code examples demonstrating how to send a POST request containing JSON data from a Cloudflare Worker to an external server.Questions about a guide and code examples demonstrating how to send a POST request containing JSON data from a Cloudflare Worker to a...
examples/workers-examples-post-json-cloudflare-workers-post-json.textA JavaScript example demonstrating how to handle and process a POST request containing a JSON body within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to handle and process a POST request containing a JSON body within a Cloudflar...
examples/workers-examples-post-json-cloudflare-workers-post-json-2.textA JavaScript example demonstrating how to handle and process a JSON body within a Cloudflare Workers fetch handler.Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to handle and process a JSON body within a Cloudflare Workers fetch handler.
examples/workers-examples-post-json-cloudflare-workers-post-json-python.textA Python example using Pyodide to demonstrate how to perform a POST request with a JSON body within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A Python example using Pyodide to demonstrate how to perform a POST request with a JSON body within a Cloudflare Worker.
examples/workers-examples-post-json-cloudflare-workers-hono-post-json-request.textA Hono framework example demonstrating how to send a JSON body in a POST request within a Cloudflare Worker.Exact payloads, commands, or snippets shown in A Hono framework example demonstrating how to send a JSON body in a POST request within a Cloudflare Worker.

What This Skill Covers

  • Send a POST request with JSON data. Use to share data with external servers.
  • 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/post-json