cloudflare · Cloudflare Workers Docs
Workers http
Instructions for enabling and using the Node.js http module in Cloudflare Workers, including specific compatibility flags required for client-side and server-side HTTP functionality.
Derived skill
Files assembled from official documentation
Viewing SKILL.md
Workers http
Instructions for enabling and using the Node.js http module in Cloudflare Workers, including specific compatibility flags required for client-side and server-side HTTP functionality.
When To Use
Use when you need to enable Node.js http module support in a Cloudflare Worker to perform client-side GET requests or set up server-side HTTP servers using Node.js syntax.
Reference Files
| File | Contains | Use For |
|---|---|---|
SKILL.md | Entry point: scope, routing table, and workflow. | Start here. |
docs/workers-runtime-apis-nodejs-http-workflow-guide.md | Documentation detailing the Node.js http module compatibility, including client-side and server-side methods and required compatibility flags for Cloudflare Workers. | Questions about documentation detailing the Node.js http module compatibility, including client-side and server-side methods and requ... |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-compatib.text | A configuration snippet showing the compatibility flags required to enable Node.js HTTP module support in Cloudflare Workers. | Exact payloads, commands, or snippets shown in A configuration snippet showing the compatibility flags required to enable Node.js HTTP module support in Cloudflare... |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-compatib-2.text | A text snippet showing the required compatibility flags to enable Node.js HTTP module support in Cloudflare Workers. | Exact payloads, commands, or snippets shown in A text snippet showing the required compatibility flags to enable Node.js HTTP module support in Cloudflare Workers. |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http.text | A text example demonstrating the implementation of the Node.js HTTP module within a Cloudflare Workers environment. | Exact payloads, commands, or snippets shown in A text example demonstrating the implementation of the Node.js HTTP module within a Cloudflare Workers environment. |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-server-c.text | A text snippet showing the required compatibility flags to enable Node.js HTTP server modules in Cloudflare Workers. | Exact payloads, commands, or snippets shown in A text snippet showing the required compatibility flags to enable Node.js HTTP server modules in Cloudflare Workers. |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-compatib-3.text | A text configuration showing the compatibility flags required to enable Node.js HTTP and HTTPS server modules in Cloudflare Workers. | Exact payloads, commands, or snippets shown in A text configuration showing the compatibility flags required to enable Node.js HTTP and HTTPS server modules in Clou... |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-compatib-4.text | A configuration snippet showing the required compatibility flags to enable Node.js HTTP and HTTPS server modules in Cloudflare Workers. | Exact payloads, commands, or snippets shown in A configuration snippet showing the required compatibility flags to enable Node.js HTTP and HTTPS server modules in C... |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-get-requ.text | A JavaScript example demonstrating how to use the node:http module within a Cloudflare Worker to perform a GET request. | Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to use the node:http module within a Cloudflare Worker to perform a GET request. |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-get-requ-2.text | A JavaScript example demonstrating how to use the node:http module to perform a GET request within a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to use the node:http module to perform a GET request within a Cloudflare Worker. |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-get-inco.text | A JavaScript example demonstrating how to use the node:http module to perform a GET request and validate an IncomingMessage instance within a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A JavaScript example demonstrating how to use the node:http module to perform a GET request and validate an IncomingM... |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-server.text | A Node.js http module implementation using createServer to handle requests within a Cloudflare Worker environment. | Exact payloads, commands, or snippets shown in A Node.js http module implementation using createServer to handle requests within a Cloudflare Worker environment. |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-agent.text | A text example demonstrating the usage of the node:http Agent within a Cloudflare Workers environment. | Exact payloads, commands, or snippets shown in A text example demonstrating the usage of the node:http Agent within a Cloudflare Workers environment. |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-server-2.text | A Node.js HTTP server implementation using createServer and httpServerHandler for Cloudflare Workers. | Exact payloads, commands, or snippets shown in A Node.js HTTP server implementation using createServer and httpServerHandler for Cloudflare Workers. |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-server-h.text | A text example demonstrating how to use the httpServerHandler to wrap a Node.js http server for use within a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A text example demonstrating how to use the httpServerHandler to wrap a Node.js http server for use within a Cloudfla... |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-server-3.text | A Node.js HTTP server implementation using createServer that is handled as a Node request within a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A Node.js HTTP server implementation using createServer that is handled as a Node request within a Cloudflare Worker. |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-server-4.text | A Node.js http module implementation using the Server class to handle requests within a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A Node.js http module implementation using the Server class to handle requests within a Cloudflare Worker. |
examples/workers-runtime-apis-nodejs-http-cloudflare-workers-nodejs-http-server-5.text | A Node.js http module example demonstrating how to create a server and stream JSON responses within a Cloudflare Worker. | Exact payloads, commands, or snippets shown in A Node.js http module example demonstrating how to create a server and stream JSON responses within a Cloudflare Worker. |
What This Skill Covers
- To enable built-in Node.js APIs and polyfills, add the nodejs\compat compatibility flag to your Wrangler configuration file. This also enables nodejs\compat...
- Main sections:
Compatibility flags,Client-side methods,Server-side methods,get,request.
Workflow
- Open the most relevant file under
docs/for the exact documented workflow and wording. - Open
schemas/files for exact structured contracts. - Open
examples/files for concrete requests, commands, snippets, and manifests. - Do not add behavior or configuration that is not present in the attached source files.
Canonical source: https://developers.cloudflare.com/workers/runtime-apis/nodejs/http
