Ports #
A source: it has no inputs.
| Port | Direction | Kind | Required | Description |
|---|---|---|---|---|
out | output | records | yes |
Parameters #
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
url | string | none | yes | |
timeoutMs | integer | 30000 | no | Minimum 1. |
When to use it #
- A public data set or an internal export published as NDJSON at a URL: one
GET, the response body becomes the stream. - Give up on a slow server after a set time with
timeoutMs.
When to use something else
- The node needs a
networkgrant for the URL's host and port. No credentials are sent — authenticated sources are outside the standard library in v0.1 — and any status other than 200 fails the run.
A tested example #
Nothing here is invented: this is the test “fetching without a network grant is refused” from the pipe's own portable test file, which every conformant runner must pass.
{
"url": "https://data.example.org/events.ndjson"
}This test gives the pipe no input.
Expected result: the run fails with E_PERMISSION. Nothing is written to the outputs.
The test grants the node no permissions.
The same step as a node of a pipeline.yaml:
nodes:
http-source:
pipe: std:http-source
parameters:
url: "https://data.example.org/events.ndjson"Written like this, the node is refused, exactly as in the test: it needs a grant.
Notes from the manifest #
The pipe's manifest, OPENFLANGE.md, carries these notes.
Part of the OpenFlange standard library (std, version 0.1).
A source that performs one HTTP GET on url and streams the response body
as NDJSON (one JSON value per line), emitting items while the download is in
progress. A response status other than 200 fails the run with E_RUNTIME;
malformed lines are E_FORMAT. timeoutMs bounds the whole exchange
including the body; exceeding it fails with E_TIMEOUT.
Permission and safety #
The permission depends on the url parameter (a dynamic permission
requirement of the standard library): network for the URL's host:port
(default ports 443/80). The consumer must grant it and the runner
enforces it, refusing with E_PERMISSION otherwise:
- HTTPS only; plain HTTP is accepted for loopback addresses only;
- the address actually connected to is checked after DNS resolution: a public host name can never reach loopback, private or link-local addresses (SSRF protection);
- redirects are limited, re-checked per hop against the grant (a redirect to another host needs that host granted too), and may not downgrade to HTTP;
- no cookies, no proxy from the environment, no credentials. Authenticated sources are out of scope for the standard library in v0.1.
openflange run pipeline.yaml --grant network=data.example.org:443Reference #
- Maturity
- Experimental
- Manifest version
0.1.0
- Normative definition: std:http-source in the standard library specification
- Manifest and tests: std/0.1/http-source in the specification repository