io.b3os/http 1.0.0 · http, developer-tools, webhooks · MIT

Plain HTTP requests to public URLs: GET and HEAD, and POST, PUT, PATCH or DELETE with a JSON, form or text body. For public APIs without a pack and for URLs that carry their own authorization, such as webhook URLs and presigned links. No credentials are ever attached; private and loopback addresses are refused. Prefer a provider pack when one exists: it has typed inputs and outputs.

Every call's result carries upstream_status and timing: validate_ms, inject_ms, render_ms, upstream_ms, map_ms and total_ms. upstream is the service's time; the others are B3OS's own (call actions). The snippets below show no timing values, because a fixture records none.

Connection

No credential: a keyless public API. Calls name no connection.

Hosts it reaches: *.

Actions

ActionEffectMCP toolTitle
getreadhttp__getGET a URL
headreadhttp__headHEAD a URL
post-jsonirreversiblehttp__post-jsonPOST JSON
post-formirreversiblehttp__post-formPOST form
post-textirreversiblehttp__post-textPOST text
put-jsonirreversiblehttp__put-jsonPUT JSON
patch-jsonirreversiblehttp__patch-jsonPATCH JSON
deleteirreversiblehttp__deleteDELETE a URL

get

GET a URL. Fetch a URL with GET and return the status, content type, Location and ETag headers, and the body (parsed JSON when the response is JSON, otherwise text). Non-2xx statuses fail with an error code unless fail_on_error_status is false.

Ref io.b3os/http/get@1.0.0 · effect read · no connection · MCP tool http__get

bash
curl -s https://beta-api.b3os.org/v1/actions/call \ -H "Authorization: Bearer $B3OS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ref": "io.b3os/http/get@1", "input": {"url": "https://httpbin.org/json"} }'

Output, labeled fixture: GET a URL (response recorded 2026-10-26). From the bundle's fixtures/get-json.json, not a live call.

json
{ "status": 200, "content_type": "application/json", "location": null, "etag": null, "body": { "slideshow": { "author": "Yours Truly", "date": "date of publication", "slides": [ {"title": "Wake up to WonderWidgets!", "type": "all"}, { "items": [ "Why <em>WonderWidgets</em> are great", "Who <em>buys</em> WonderWidgets" ], "title": "Overview", "type": "all" } ], "title": "Sample Slide Show" } }}

When the service answers with an error, the call fails with upstream_error and pack_error.code is one of:

pack_error.codeService statusRetryableMessage
not_found404, 410nobuilt from the service's response
forbidden401, 403nobuilt from the service's response
rate_limited429yesrate limited (429); retry later
invalid_requestmatched on the response bodynobuilt from the service's response

head

HEAD a URL. Check a URL without downloading it: status, content type, content length, ETag, Last-Modified and Location (for redirects).

Ref io.b3os/http/head@1.0.0 · effect read · no connection · MCP tool http__head

bash
curl -s https://beta-api.b3os.org/v1/actions/call \ -H "Authorization: Bearer $B3OS_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "ref": "io.b3os/http/head@1", "input": {"url": "https://httpbin.org/robots.txt"} }'

Output, labeled fixture: HEAD a URL (response recorded 2026-10-26). From the bundle's fixtures/head.json, not a live call.

json
{ "status": 200, "content_type": "text/plain", "content_length": "30", "etag": null, "last_modified": null, "location": null}

When the service answers with an error, the call fails with upstream_error and pack_error.code is one of:

pack_error.codeService statusRetryableMessage
not_found404, 410nobuilt from the service's response
forbidden401, 403nobuilt from the service's response
rate_limited429yesrate limited (429); retry later
invalid_requestmatched on the response bodynobuilt from the service's response

post-json

POST JSON. POST a JSON body to a URL (a webhook, an API endpoint without a pack) and return the status and the response body. Not idempotent: retrying may repeat the effect.

Ref io.b3os/http/post-json@1.0.0 · effect irreversible · no connection · MCP tool http__post-json

bash
curl -s https://beta-api.b3os.org/v1/actions/call \ -H "Authorization: Bearer $B3OS_API_KEY" \ -H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \ -H "Content-Type: application/json" \ -d '{ "ref": "io.b3os/http/post-json@1", "input": { "url": "https://httpbin.org/anything/hooks/deploy", "body": {"event": "deploy", "version": "2.4.1", "ok": true} } }'

Output, labeled fixture: POST JSON (response recorded 2026-10-26). From the bundle's fixtures/post-json.json, not a live call.

json
{ "status": 200, "content_type": "application/json", "location": null, "etag": null, "body": { "args": {}, "data": "{\"event\":\"deploy\",\"version\":\"2.4.1\",\"ok\":true}", "files": {}, "form": {}, "headers": { "Accept": "application/json, text/*;q=0.9, */*;q=0.8", "Accept-Encoding": "br, gzip, deflate", "Accept-Language": "*", "Content-Length": "46", "Content-Type": "application/json", "Host": "httpbin.org", "Sec-Fetch-Mode": "cors", "User-Agent": "b3os-actions/1 (+https://beta.b3os.org)" }, "json": {"event": "deploy", "ok": true, "version": "2.4.1"}, "method": "POST", "url": "https://httpbin.org/anything/hooks/deploy" }}

When the service answers with an error, the call fails with upstream_error and pack_error.code is one of:

pack_error.codeService statusRetryableMessage
not_found404, 410nobuilt from the service's response
forbidden401, 403nobuilt from the service's response
rate_limited429yesrate limited (429); retry later
invalid_requestmatched on the response bodynobuilt from the service's response

post-form

POST form. POST form fields (application/x-www-form-urlencoded) to a URL and return the status and the response body. Not idempotent.

Ref io.b3os/http/post-form@1.0.0 · effect irreversible · no connection · MCP tool http__post-form

bash
curl -s https://beta-api.b3os.org/v1/actions/call \ -H "Authorization: Bearer $B3OS_API_KEY" \ -H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \ -H "Content-Type: application/json" \ -d '{ "ref": "io.b3os/http/post-form@1", "input": { "url": "https://httpbin.org/post", "body": {"name": "Ada", "tags": ["a", "b"], "count": 2} } }'

Output, labeled fixture: POST form (response recorded 2026-10-26). From the bundle's fixtures/post-form.json, not a live call.

json
{ "status": 200, "content_type": "application/json", "location": null, "etag": null, "body": { "args": {}, "data": "", "files": {}, "form": {"count": "2", "name": "Ada", "tags": ["a", "b"]}, "headers": { "Accept": "application/json, text/*;q=0.9, */*;q=0.8", "Accept-Encoding": "br, gzip, deflate", "Accept-Language": "*", "Content-Length": "30", "Content-Type": "application/x-www-form-urlencoded", "Host": "httpbin.org", "Sec-Fetch-Mode": "cors", "User-Agent": "b3os-actions/1 (+https://beta.b3os.org)" }, "json": null, "url": "https://httpbin.org/post" }}

When the service answers with an error, the call fails with upstream_error and pack_error.code is one of:

pack_error.codeService statusRetryableMessage
not_found404, 410nobuilt from the service's response
forbidden401, 403nobuilt from the service's response
rate_limited429yesrate limited (429); retry later
invalid_requestmatched on the response bodynobuilt from the service's response

post-text

POST text. POST a text body (plain text, CSV, XML, NDJSON, ...) with the content type you give and return the status and the response body. Not idempotent.

Ref io.b3os/http/post-text@1.0.0 · effect irreversible · no connection · MCP tool http__post-text

bash
curl -s https://beta-api.b3os.org/v1/actions/call \ -H "Authorization: Bearer $B3OS_API_KEY" \ -H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \ -H "Content-Type: application/json" \ -d '{ "ref": "io.b3os/http/post-text@1", "input": { "url": "https://httpbin.org/anything/ingest", "body": "id,value\n1,42\n", "content_type": "text/csv" } }'

Output, labeled fixture: POST text (response recorded 2026-10-26). From the bundle's fixtures/post-text.json, not a live call.

json
{ "status": 200, "content_type": "application/json", "location": null, "etag": null, "body": { "args": {}, "data": "id,value\n1,42\n", "files": {}, "form": {}, "headers": { "Accept": "application/json, text/*;q=0.9, */*;q=0.8", "Accept-Encoding": "br, gzip, deflate", "Accept-Language": "*", "Content-Length": "14", "Content-Type": "text/csv", "Host": "httpbin.org", "Sec-Fetch-Mode": "cors", "User-Agent": "b3os-actions/1 (+https://beta.b3os.org)" }, "json": null, "method": "POST", "url": "https://httpbin.org/anything/ingest" }}

When the service answers with an error, the call fails with upstream_error and pack_error.code is one of:

pack_error.codeService statusRetryableMessage
not_found404, 410nobuilt from the service's response
forbidden401, 403nobuilt from the service's response
rate_limited429yesrate limited (429); retry later
invalid_requestmatched on the response bodynobuilt from the service's response

put-json

PUT JSON. PUT a JSON body to a URL (replace a resource) and return the status and the response body.

Ref io.b3os/http/put-json@1.0.0 · effect irreversible · no connection · MCP tool http__put-json

bash
curl -s https://beta-api.b3os.org/v1/actions/call \ -H "Authorization: Bearer $B3OS_API_KEY" \ -H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \ -H "Content-Type: application/json" \ -d '{ "ref": "io.b3os/http/put-json@1", "input": { "url": "https://httpbin.org/put", "body": {"name": "widget", "size": 3} } }'

Output, labeled fixture: PUT JSON (response recorded 2026-10-26). From the bundle's fixtures/put-json.json, not a live call.

json
{ "status": 200, "content_type": "application/json", "location": null, "etag": null, "body": { "args": {}, "data": "{\"name\":\"widget\",\"size\":3}", "files": {}, "form": {}, "headers": { "Accept": "application/json, text/*;q=0.9, */*;q=0.8", "Accept-Encoding": "br, gzip, deflate", "Accept-Language": "*", "Content-Length": "26", "Content-Type": "application/json", "Host": "httpbin.org", "Sec-Fetch-Mode": "cors", "User-Agent": "b3os-actions/1 (+https://beta.b3os.org)" }, "json": {"name": "widget", "size": 3}, "url": "https://httpbin.org/put" }}

When the service answers with an error, the call fails with upstream_error and pack_error.code is one of:

pack_error.codeService statusRetryableMessage
not_found404, 410nobuilt from the service's response
forbidden401, 403nobuilt from the service's response
rate_limited429yesrate limited (429); retry later
invalid_requestmatched on the response bodynobuilt from the service's response

patch-json

PATCH JSON. PATCH a URL with a JSON body (partial update) and return the status and the response body.

Ref io.b3os/http/patch-json@1.0.0 · effect irreversible · no connection · MCP tool http__patch-json

bash
curl -s https://beta-api.b3os.org/v1/actions/call \ -H "Authorization: Bearer $B3OS_API_KEY" \ -H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \ -H "Content-Type: application/json" \ -d '{ "ref": "io.b3os/http/patch-json@1", "input": {"url": "https://httpbin.org/patch", "body": {"size": 4}} }'

Output, labeled fixture: PATCH JSON (response recorded 2026-10-26). From the bundle's fixtures/patch-json.json, not a live call.

json
{ "status": 200, "content_type": "application/json", "location": null, "etag": null, "body": { "args": {}, "data": "{\"size\":4}", "files": {}, "form": {}, "headers": { "Accept": "application/json, text/*;q=0.9, */*;q=0.8", "Accept-Encoding": "br, gzip, deflate", "Accept-Language": "*", "Content-Length": "10", "Content-Type": "application/json", "Host": "httpbin.org", "Sec-Fetch-Mode": "cors", "User-Agent": "b3os-actions/1 (+https://beta.b3os.org)" }, "json": {"size": 4}, "url": "https://httpbin.org/patch" }}

When the service answers with an error, the call fails with upstream_error and pack_error.code is one of:

pack_error.codeService statusRetryableMessage
not_found404, 410nobuilt from the service's response
forbidden401, 403nobuilt from the service's response
rate_limited429yesrate limited (429); retry later
invalid_requestmatched on the response bodynobuilt from the service's response

delete

DELETE a URL. Send DELETE to a URL and return the status and the response body. Deleting cannot be undone.

Ref io.b3os/http/delete@1.0.0 · effect irreversible · no connection · MCP tool http__delete

bash
curl -s https://beta-api.b3os.org/v1/actions/call \ -H "Authorization: Bearer $B3OS_API_KEY" \ -H "Idempotency-Key: 7c1e2f6a-1d43-4a8e-b2a5-3f0c9d5e8b11" \ -H "Content-Type: application/json" \ -d '{ "ref": "io.b3os/http/delete@1", "input": {"url": "https://httpbin.org/delete"} }'

Output, labeled fixture: DELETE a URL (response recorded 2026-10-26). From the bundle's fixtures/delete.json, not a live call.

json
{ "status": 200, "content_type": "application/json", "location": null, "etag": null, "body": { "args": {}, "data": "", "files": {}, "form": {}, "headers": { "Accept": "application/json, text/*;q=0.9, */*;q=0.8", "Accept-Encoding": "br, gzip, deflate", "Accept-Language": "*", "Host": "httpbin.org", "Sec-Fetch-Mode": "cors", "User-Agent": "b3os-actions/1 (+https://beta.b3os.org)" }, "json": null, "url": "https://httpbin.org/delete" }}

When the service answers with an error, the call fails with upstream_error and pack_error.code is one of:

pack_error.codeService statusRetryableMessage
not_found404, 410nobuilt from the service's response
forbidden401, 403nobuilt from the service's response
rate_limited429yesrate limited (429); retry later
invalid_requestmatched on the response bodynobuilt from the service's response
Ask a question... ⌘I