ComfyUI Node

Request URL

Make an HTTP Call Mid-Workflow and Keep Your Data Moving

By lihaoyun6·Created 12 months ago·Updated 13 days ago· 20
Request URL
  • any
  • any
  • resp
url

Sometimes a workflow needs to tell the outside world something. Request URL (class RequestURL) is the lhyNodes version of a webhook-in-the-middle: give it any input plus a URL, it fires a GET request to that URL, passes your input through untouched, and hands you the response body as a string. Think "ping a Discord/Gotify-style notifier after a render," "hit an API to record a job," or "fetch a tiny bit of text from a service mid-pipeline" - that's this node.

The mechanics are unpretentious: it takes any (any type, a pass-through) and url (the target), does a synchronous requests.get(url) - the yarl URL parsing is why the pack's requirements include that library - and returns two outputs: any (your input, unchanged) and resp (the HTTP response body as text). The pass-through design is the smart bit: you can drop the node anywhere in a graph without forking your data flow, because whatever you feed it comes out the other side plus a response string to read or log.

The inputs that matter

  • any - anything you want to carry through. This is what keeps the node "in line" with your graph instead of hanging off the side.
  • url - the endpoint. GET only; the node has no method, header, or body parameters.

Outputs: any (pass-through) and resp (the response text).

Where people get burned

The big one: it's a blocking GET, called on the main execution thread. If the URL is slow or unreachable, your workflow sits and waits - and ComfyUI can look frozen while the request times out. Point it at fast, reliable endpoints, and don't put it in the hot path of a loop. Relatedly, there's no error handling surfaced in the UI: a bad URL throws into the console rather than giving you a friendly "that failed" state. And because it's plain GET, you can't send a JSON body or headers - for fancier API calls you'll want a dedicated HTTP node or a Python node instead of this one.

The second thing to keep in mind is that it's the workflow making the request, not you - so it fires on every run. If you use it as a notifier, you'll want the URL to be something that tolerates being hit repeatedly, or you'll get a notification storm the first time you batch-generate.

Installing it

Part of lhaoyun6/ComfyUI-lhyNodes. Install via ComfyUI Manager by searching for lhyNodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/lihaoyun6/ComfyUI-lhyNodes.git
python -m pip install -r ComfyUI-lhyNodes/requirements.txt

Restart ComfyUI. The pack's shared requirements are ultralytics, opencv-python, numpy, and yarl - the last one is the yarl that parses your URL - and no models are involved.

It's a small, honest utility: pass data through, fire a GET, read the response. For a "poke a webhook when the batch is done" workflow it's exactly the right size, as long as you remember it's synchronous and a little unguarded. Keep the target fast and the node will serve you fine.

CategorylhyNodes/Utils

Inputs (2)

NameTypeDefaultDescription
any*
urlSTRING

Outputs (2)

NameTypeDescription
any*
respSTRING