Hoody Pipe streams data between senders and receivers over named “pipe paths” with no server-side storage. The web interface provides a browser-based upload form, the service info endpoints expose health checks and inline help, and the data transfer endpoints let scripts, curl, and other clients exchange files, text, and binary streams in real time.
Use the Web Interface endpoints to embed the pipe UI in a browser, the Service Info endpoints for health probes and copy-paste examples, and the Data Transfer endpoints to programmatically send and receive payloads.
Web Interface
Section titled “Web Interface”GET /api/v1/pipe
Section titled “GET /api/v1/pipe”Returns the Hoody Pipe web interface — an HTML page for sending files or text to a pipe path from the browser. Also accessible at / (root alias).
This endpoint takes no parameters.
curl https://{projectId}-{containerId}-pipe-1.{server}.containers.hoody.icu/api/v1/pipeawait client.pipe.ui.getIndex();<!DOCTYPE html><html lang="en"><head> <title>Hoody Pipe</title> <meta charset="utf-8"></head><body> <main id="app">Hoody Pipe — Streaming Data Transfer over HTTP</main></body></html>GET /api/v1/pipe/noscript
Section titled “GET /api/v1/pipe/noscript”Returns a pure HTML form for file/text upload that works without JavaScript. Useful in restricted browser environments or when JavaScript is disabled. Also accessible at /noscript.
The form supports a path query parameter to pre-fill the pipe path and enable the send button, and a mode query parameter to switch between file (default) and text input. Path values are sanitized (leading slashes stripped, only URL-safe characters). The response uses a CSP style nonce to block scripts.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
path | query | string | No | Pre-fill the pipe path. Only URL-safe characters allowed. |
mode | query | string | No | Input mode: file for file picker, text for textarea. Allowed values: file, text. Default: file. |
curl "https://{projectId}-{containerId}-pipe-1.{server}.containers.hoody.icu/api/v1/pipe/noscript?path=mypath&mode=file"await client.pipe.ui.getNoScript({ path: "mypath", mode: "file" });<!DOCTYPE html><html lang="en"><head> <meta http-equiv="Content-Security-Policy" content="style-src 'nonce-abc123'"> <title>Hoody Pipe — Upload</title></head><body> <form action="/api/v1/pipe/mypath" method="POST" enctype="multipart/form-data"> <input type="file" name="file"> <button type="submit">Send</button> </form></body></html>Service Info
Section titled “Service Info”GET /api/v1/pipe/help
Section titled “GET /api/v1/pipe/help”Returns plain text usage instructions showing how to send and receive data using curl. The help text includes the server’s own URL (derived from the Host header) so the examples can be copied and run directly. Sections cover receiving data, sending files/text/directories with curl -T, ?download and ?filename control, ?video browser playback, ?progress transfer monitoring, and end-to-end encryption with OpenSSL. Also accessible at /help.
This endpoint takes no parameters.
curl https://{projectId}-{containerId}-pipe-1.{server}.containers.hoody.icu/api/v1/pipe/helpawait client.pipe.info.getHelp();Hoody Pipe 1.6.1Streaming Data Transfer over HTTP
======= Get =======curl https://pipe.example.com/mypathGET /api/v1/pipe/health
Section titled “GET /api/v1/pipe/health”Returns the standardized 9-field health response. Unauthenticated. Only reachable at /api/v1/pipe/health — a bare /health returns 404 with the body [ERROR] '/health' is not a valid path. Use '/api/v1/pipe/health'.\n. Methods other than GET, HEAD, or OPTIONS return 405 with [ERROR] Method <verb> is not allowed.\n and Allow: GET, HEAD, OPTIONS.
This endpoint takes no parameters.
curl https://{projectId}-{containerId}-pipe-1.{server}.containers.hoody.icu/api/v1/pipe/healthawait client.pipe.health.check();{ "status": "ok", "service": "pipe", "built": "2024-09-15T10:00:00.000Z", "started": "2024-09-15T12:00:00.000Z", "memory": { "rss": 52428800, "heap": 20971520 }, "fds": 12, "pid": 1234, "ip": "10.0.0.5", "userAgent": "hoody-sdk/1.0"}Data Transfer
Section titled “Data Transfer”GET /api/v1/pipe/{path}
Section titled “GET /api/v1/pipe/{path}”Receive data from the specified pipe path. The response blocks until a sender connects and starts streaming. Once established, the response body contains the sender’s data with original headers forwarded.
Lifecycle:
- Receiver
GETs a path → request blocks - When a sender
POSTs/PUTs to the same path with matchingn, the pipe establishes - Response starts streaming with the sender’s data
- Response completes when the sender finishes uploading
Headers forwarded from sender:
Content-Type— sender’s content type (dangerous types rewritten totext/plain; foreign params dropped except a safe charset)Content-Length— only when the sender provided a valid^\d{1,19}$value AND the body is non-multipartContent-Disposition— if provided; a sender-suppliedinlineis upgraded toattachmentunless the effective Content-Type is on the inline-safe allowlist (image/*,audio/*,video/*,text/plain,application/pdf, excludingimage/svg+xml)X-Piping— custom metadata from senderX-Hoody-Pipe— custom metadata from sender
Forwarded headers are CRLF-sanitized to prevent header injection.
Download control via query parameters:
?download— forceattachmentdisposition (triggers browser download)?download=false— suppressContent-Dispositionentirely (always display inline)?filename=custom.txt— set a custom download filename (implies?download)
These work per-receiver — with n=2, one receiver can download while the other displays inline.
Multi-receiver: When n exceeds 1, all receivers get identical copies via lockstep fan-out — each chunk is written to every receiver before the next chunk is read from the sender. Memory is bounded to roughly one chunk per receiver. The slowest receiver paces the entire transfer — its backpressure applies to the sender and transitively to all other receivers.
Connection ordering: Either party can connect first — the server holds the early party until counterparts arrive (up to a 5-minute TTL).
Security headers on response: X-Robots-Tag: none, X-Content-Type-Options: nosniff, and CORS headers reflecting the receiver’s Origin.
Also accessible without prefix (e.g. GET /myfile).
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
path | path | string | Yes | Pipe path name to receive from — must match the path used by the sender. Reserved paths (/help, /noscript, etc.) return their own content on GET instead of acting as pipe receivers. |
n | query | integer | No | Expected number of receivers. Must match the sender’s n value exactly — a mismatch returns 400. When n exceeds 1, the pipe waits for all n receivers and the sender before streaming. Default: 1. |
download | query | string | No | Control whether the response triggers a browser download. ?download, ?download=true, ?download=yes, ?download=1 force Content-Disposition: attachment. ?download=false, ?download=no, ?download=0 suppress Content-Disposition entirely. Absent passthroughs the sender’s Content-Disposition as-is. |
filename | query | string | No | Set a custom download filename. Implies ?download. Null bytes, CRLF, path separators, leading dots, and control characters are stripped. Truncated to 255 characters. Non-ASCII filenames use RFC 5987 filename*=UTF-8''... encoding. Filenames that sanitize to empty fall back to bare attachment. |
video | query | string | No | Return an HTML page with an embedded MSE video player instead of raw pipe data. The player page fetches the raw stream internally — no pipe receiver slot is consumed by the page itself. Only serves the HTML player when the client sends Accept: text/html; non-browser clients fall through to normal pipe receiver behavior. ?video, ?video=true, ?video=yes, ?video=1 show the player; ?video=false, ?video=no, ?video=0 return normal pipe data. |
progress | query | string | No | Return real-time transfer progress as an SSE stream or HTML dashboard. Does NOT consume a pipe receiver slot. Accept header routing: text/event-stream for SSE; text/html for dashboard; */* or missing defaults to SSE. ?progress, ?progress=true, ?progress=yes, ?progress=1 show progress; ?progress=false, ?progress=no, ?progress=0 return normal pipe data. |
curl https://{projectId}-{containerId}-pipe-1.{server}.containers.hoody.icu/api/v1/pipe/mypathawait client.pipe.pipe.receive("mypath");The response streams the sender’s data. Content-Type matches what the sender sent. Response headers always include X-Robots-Tag: none and X-Content-Type-Options: nosniff. When the sender provided custom headers, the response includes Access-Control-Expose-Headers: X-Piping, X-Hoody-Pipe.
HTTP/1.1 200 OKContent-Type: application/octet-streamX-Robots-Tag: noneX-Content-Type-Options: nosniffAccess-Control-Expose-Headers: X-Piping, X-Hoody-Pipe
<binary stream from sender>[ERROR] All 2 receiver slot(s) for '/mypath' are already taken.| Error Code | Title | Description | Resolution |
|---|---|---|---|
SERVICE_WORKER | Service Worker request blocked | Requests with Service-Worker: script header are rejected to prevent service worker registration via pipe paths | Do not register service workers via pipe paths |
ACTIVE_TRANSFER | Path has an active transfer | A transfer is already streaming on this path — no new receivers can join | Wait for the transfer to complete, or use a different path |
RECEIVER_SLOTS_FULL | All receiver slots taken | All n receiver slots for this path are occupied | Wait for a receiver to disconnect, or use a different path |
INVALID_N | Invalid receiver count | n is not a valid positive integer (1–256) | Set n between 1 and 256 |
N_MISMATCH | Receiver count mismatch | This receiver’s n doesn’t match existing sender/receivers on this path | Use the same n value as the sender |
[ERROR] Method DELETE is not allowed. Use GET, POST, or PUT.| Error Code | Title | Description | Resolution |
|---|---|---|---|
METHOD_NOT_ALLOWED | HTTP method not supported | Pipe paths accept GET, POST, PUT, OPTIONS only | Use GET to receive data |
[ERROR] Timed out waiting for sender.| Error Code | Title | Description | Resolution |
|---|---|---|---|
TTL_EXPIRED | Pipe TTL expired | Waited 5 minutes but counterpart didn’t connect. Pipe evicted. | Retry — ensure sender and receiver connect within 5 minutes |
[ERROR] Path too long (max 1024 characters).| Error Code | Title | Description | Resolution |
|---|---|---|---|
PATH_TOO_LONG | Path exceeds length limit | Path exceeds 1024 characters | Use a shorter path |
[ERROR] Too many pending transfers. Try again later.| Error Code | Title | Description | Resolution |
|---|---|---|---|
TOO_MANY_PENDING | Pending transfer limit reached | Server has 1000 pending pipes | Wait and retry |
TOO_MANY_ACTIVE | Active transfer limit reached | Server has 1000 active transfers — pipe established but cannot stream | Wait for transfers to finish, then retry |
POST /api/v1/pipe/{path}
Section titled “POST /api/v1/pipe/{path}”Send data to the specified pipe path. The sender’s request body is streamed directly to receiver(s) when they connect — no server-side storage.
Lifecycle:
- Sender
POSTs to a path → gets back a streaming response with[INFO]status messages - Server waits for
nreceivers to connect (default: 1) - Once all receivers connect, data streams from sender to all receivers simultaneously
- Sender receives
[INFO] Upload complete.then[INFO] Transfer complete.
Status messages streamed to the sender as text/plain:
[INFO] Waiting for 1 receiver(s) to connect...[INFO] Streaming to 1 receiver(s)...[INFO] Upload complete.[INFO] Transfer complete.Multipart uploads: When Content-Type matches multipart/form-data (case-insensitive), the server extracts the first file part (non-file form fields are drained and skipped) and streams its contents. The part’s Content-Type and Content-Disposition are forwarded to receivers. Content-Length is NOT forwarded for multipart inputs (the response uses chunked transfer encoding). A multipart body containing no file part is rejected with [ERROR] Transfer failed and receivers receive 500. Slow-loris bound: parsing aborts if no part arrives within 30 s.
Custom headers: Set X-Hoody-Pipe or X-Piping request headers to forward arbitrary metadata to receivers. Each header is capped at 8 KiB (over-cap headers are dropped) and CRLF/control chars are stripped. The receiver response carries Access-Control-Expose-Headers: X-Piping, X-Hoody-Pipe only when at least one was supplied.
Content-Type safety: Dangerous MIME types that execute scripts in browsers (text/html, image/svg+xml, application/javascript, the full WHATWG JS-essence list, XHTML/XML) are rewritten to text/plain. Parameters are stripped except for a single safe charset (utf-8/us-ascii/iso-8859-1).
Connection ordering: Either sender or receiver(s) can connect first.
Limits:
- Path length: max 1024 characters
- Receiver count (
n): 1–256 - Pending transfers: max 1000 server-wide
- Active transfers: max 1000 server-wide
- Unestablished pipe TTL: 5 minutes
Also accessible without prefix (e.g. POST /myfile).
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
path | path | string | Yes | Unique pipe path name. Must not be a reserved path (/, /help, /noscript, /favicon.ico, /robots.txt). Examples: myfile, transfer123, secret.png, logs/today. |
n | query | integer | No | Number of receivers to wait for before starting the transfer. All receivers get identical copies of the data (fan-out). Must be a positive integer, max 256. Default: 1. |
Request Body
Section titled “Request Body”Data to stream to receiver(s). Any content type is accepted.
- Binary files: Use
application/octet-streamor the file’s actual MIME type. - Text: Use
text/plain. - Multipart: Use
multipart/form-datafor browser uploads — only the first file part is streamed; leading non-file form fields are drained and skipped. - No body: An empty
POSTis valid — receivers get an empty response.
curl -X POST https://{projectId}-{containerId}-pipe-1.{server}.containers.hoody.icu/api/v1/pipe/mypath \ --data-binary "@myfile.png" \ -H "Content-Type: application/octet-stream"// SDK provides path + query options only.// Request body is supplied at the HTTP layer.await client.pipe.pipe.send("secret.png");[INFO] Waiting for 1 receiver(s) to connect...[INFO] Streaming to 1 receiver(s)...[INFO] Upload complete.[INFO] Transfer complete.[ERROR] '/help' is a reserved path. Use a custom path like '/myfile' or '/transfer123'.| Error Code | Title | Description | Resolution |
|---|---|---|---|
RESERVED_PATH | Path is reserved | The requested path is a system-reserved path (/, /help, /noscript, etc.) | Choose a different path that is not reserved |
DUPLICATE_SENDER | Path already has a sender | Another sender is already connected to this path waiting for receivers | Use a different path, or wait for the existing transfer to complete |
ACTIVE_TRANSFER | Path has an active transfer | The path is currently in use by a streaming transfer | Wait for the current transfer to finish, or use a different path |
INVALID_N | Invalid receiver count | The n query parameter is not a valid positive integer, or exceeds max 256 | Set n to a positive integer between 1 and 256 |
N_MISMATCH | Receiver count mismatch | Sender’s n doesn’t match existing receivers’ n on this path | Use the same n value as the receivers |
CONTENT_RANGE | Content-Range not supported | Content-Range headers are not supported for streaming transfers | Send the complete file without range headers |
[ERROR] Method DELETE is not allowed. Use GET, POST, or PUT.| Error Code | Title | Description | Resolution |
|---|---|---|---|
METHOD_NOT_ALLOWED | HTTP method not supported | Pipe paths accept GET (receive), POST/PUT (send), and OPTIONS (CORS preflight). HEAD is supported on reserved paths only. | Use GET to receive data, POST or PUT to send data |
[ERROR] Path too long (max 1024 characters).| Error Code | Title | Description | Resolution |
|---|---|---|---|
PATH_TOO_LONG | Path exceeds length limit | The pipe path exceeds the maximum length of 1024 characters | Use a shorter path name |
[ERROR] Too many pending transfers. Try again later.| Error Code | Title | Description | Resolution |
|---|---|---|---|
TOO_MANY_PENDING | Pending transfer limit reached | Server has 1000 unestablished pipes. New transfers rejected until existing ones complete or expire (5-min TTL). | Wait for transfers to complete or expire, then retry |
TOO_MANY_ACTIVE | Active transfer limit reached | Server has 1000 concurrent active transfers | Wait for active transfers to finish, then retry |
PUT /api/v1/pipe/{path}
Section titled “PUT /api/v1/pipe/{path}”Identical to POST — send data to the specified pipe path. PUT is provided as an alias because curl -T file URL uses PUT, making it natural for file transfers.
curl usage:
# Send a file (uses PUT)curl -T myfile https://pipe.example.com/api/v1/pipe/mypath
# Send stdinecho 'hello' | curl -T - https://pipe.example.com/api/v1/pipe/mypath
# Send a directory as tar.gztar czf - ./mydir | curl -T - https://pipe.example.com/api/v1/pipe/mydir.tar.gzAll parameters, request body handling, status messages, and error codes are identical to POST.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
path | path | string | Yes | Unique pipe path name (same rules as POST — no reserved paths, max 1024 chars). |
n | query | integer | No | Number of receivers to wait for (must match receivers’ n, max 256). Default: 1. |
Request Body
Section titled “Request Body”Data to stream — any content type. Multipart/form-data is supported (first file part extracted; non-file fields are skipped).
curl -T myfile.png https://{projectId}-{containerId}-pipe-1.{server}.containers.hoody.icu/api/v1/pipe/mypath[INFO] Waiting for 1 receiver(s) to connect...[INFO] Streaming to 1 receiver(s)...[INFO] Upload complete.[INFO] Transfer complete.[ERROR] '/help' is a reserved path. Use a custom path like '/myfile' or '/transfer123'.| Error Code | Title | Description | Resolution |
|---|---|---|---|
RESERVED_PATH | Path is reserved | The requested path is a system-reserved path | Choose a different path |
DUPLICATE_SENDER | Path already has a sender | Another sender is already connected | Use a different path or wait |
INVALID_N | Invalid receiver count | n is not a valid positive integer (1–256) | Set n to a positive integer between 1 and 256 |
CONTENT_RANGE | Content-Range not supported | Content-Range headers are not supported | Send the complete file |
[ERROR] Method DELETE is not allowed. Use GET, POST, or PUT.| Error Code | Title | Description | Resolution |
|---|---|---|---|
METHOD_NOT_ALLOWED | HTTP method not supported | Pipe paths accept GET, POST, PUT, OPTIONS only | Use GET to receive, POST or PUT to send |
[ERROR] Path too long (max 1024 characters).| Error Code | Title | Description | Resolution |
|---|---|---|---|
PATH_TOO_LONG | Path exceeds length limit | Path exceeds 1024 characters | Use a shorter path |
[ERROR] Too many pending transfers. Try again later.| Error Code | Title | Description | Resolution |
|---|---|---|---|
TOO_MANY_PENDING | Pending transfer limit reached | Server has 1000 pending pipes | Wait and retry |
OPTIONS /api/v1/pipe/{path}
Section titled “OPTIONS /api/v1/pipe/{path}”Handles CORS preflight requests for cross-origin browser access. Returns permissive CORS headers reflecting the request Origin.
Headers returned:
Access-Control-Allow-Origin— reflects Origin (or*if none/null)Access-Control-Allow-Methods—GET, POST, PUT, OPTIONS(HEAD is supported same-origin on reserved paths only)Access-Control-Allow-Headers—Content-Type, Content-Disposition, Authorization, X-Piping, X-Hoody-PipeAccess-Control-Allow-Credentials—true(when Origin is present and not"null")Access-Control-Max-Age—86400(24 hours)Access-Control-Allow-Private-Network—true(when requested)
The "null" origin string is rejected — defaults to * which blocks credentialed requests from sandboxed iframes.
Parameters
Section titled “Parameters”| Name | In | Type | Required | Description |
|---|---|---|---|---|
path | path | string | Yes | Any path — OPTIONS is handled identically for all paths |
curl -X OPTIONS https://{projectId}-{containerId}-pipe-1.{server}.containers.hoody.icu/api/v1/pipe/mypath \ -H "Origin: https://example.com" \ -H "Access-Control-Request-Method: POST" \ -H "Access-Control-Request-Headers: Content-Type"await client.pipe.pipe.corsPreflight("mypath");HTTP/1.1 200 OKAccess-Control-Allow-Origin: https://example.comAccess-Control-Allow-Methods: GET, POST, PUT, OPTIONSAccess-Control-Allow-Headers: Content-Type, Content-Disposition, Authorization, X-Piping, X-Hoody-PipeAccess-Control-Allow-Credentials: trueAccess-Control-Max-Age: 86400Access-Control-Allow-Private-Network: true