HTTP JSON
The Plain HTTP Request Node Your Workflow's Been Missing
- method
- response_text
Sometimes your workflow needs to talk to the internet for reasons that have nothing to do with image generation. Fetch today's weather to bake into a prompt. Pull a random quote. Ping an API and feed its text response into a text node. ComfyUI has plenty of API-wrapper nodes, but a lot of them are locked to one vendor. HTTP JSON is the generic one: you give it a URL, it does the request, and hands you back the response text as a plain STRING.
It's from babydjacNODES, the personal utility pack by solo dev babydjac. There's nothing glamorous here, and that's the appeal - it's a small, predictable HTTP client you can drop anywhere.
How it works
It's a thin wrapper around Python's requests library. You give it a URL (and optionally a method, headers, body, and timeout), it runs the request, and returns r.text as the output string. Two design decisions matter:
- URLs are restricted to
http/httpswith a host. The node explicitly rejectsfile://,ftp://, and anything without a netloc - a deliberate safety fence so the node can't be pointed at local files or arbitrary schemes. If you try, you get a message telling you exactly that. - Errors come back as strings, not crashes. If the request fails - DNS, timeout, 4xx/5xx - you get something like
HTTP error: 403 Client Error...in the output instead of an exception taking down the whole graph. That's genuinely nice for debugging: you can preview the error right in a text display node.
The name says "Json" but it doesn't parse or validate JSON - it returns whatever text the server sends. The "JSON" is about intent (most APIs speak JSON), so don't expect pretty-printed output.
The inputs that matter
- url - required. The one thing you always set.
- method - GET / POST / PUT / PATCH / DELETE, default GET.
- headers_json - a JSON object string like
{"Authorization": "Bearer ..."}, default{}. This is how you pass API keys. - body - request body for POST/PUT/PATCH/DELETE.
- timeout_sec - 1–300, default 30.
Output: a single STRING, response_text. Feed it into any text consumer.
Install
ComfyUI Manager → babydjacNODES, or git clone https://github.com/babydjac/babydjacNODES into ComfyUI/custom_nodes, restart, hard-refresh. No extra pip deps - requests is already part of ComfyUI's environment.
Gotchas
- It returns raw text, not parsed data. If you need to pull a field out of a JSON response, you'll need a JSON-parse/extract node downstream. The value here is fetching; parsing is someone else's job.
headers_jsonmust be valid JSON. A malformed string silently becomes{}, so if your authenticated call comes back 401, check that you didn't miss a quote.- Security posture. This node holds your headers and makes outbound calls by design - exactly the shape the KB warns about with API nodes (external-api-nodes.md). It's a small, readable, open-source node, but don't paste secrets into shared workflows.
For the "I just need to GET a URL into my graph" use case, this is the pack's quiet workhorse. No vendor lock-in, no magic - just a request and the text that came back.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| url | STRING | — | |
| methodopt | CHOICE | GET | — |
| headers_jsonopt | STRING | {} | — |
| bodyopt | STRING | — | |
| timeout_secopt | INT | 301–300 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| response_text | STRING | — |